some refactore
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <graphene.h>
|
||||
#include <utility>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "components/base/button.hpp"
|
||||
|
||||
namespace {
|
||||
bool is_wayland_display(GtkWidget *widget) {
|
||||
@@ -182,8 +181,7 @@ void log_menu_tree(const std::vector<TrayService::MenuNode> &nodes,
|
||||
}
|
||||
} // namespace
|
||||
|
||||
TrayIconWidget::TrayIconWidget( std::string id)
|
||||
: Button(id), id(std::move(id)),
|
||||
TrayIconWidget::TrayIconWidget(Icon::Type icon, std::string id) : IconButton(icon), id(std::move(id)),
|
||||
container(Gtk::Orientation::HORIZONTAL) {
|
||||
aliveFlag = std::make_shared<bool>(true);
|
||||
set_has_frame(false);
|
||||
@@ -592,7 +590,7 @@ void TrayWidget::on_item_added(const TrayService::Item &item) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto icon = std::make_unique<TrayIconWidget>(item.id);
|
||||
auto icon = std::make_unique<TrayIconWidget>(Icon::Type::CONTENT_COPY, item.id);
|
||||
icon->update(item);
|
||||
auto *raw = icon.get();
|
||||
append(*raw);
|
||||
|
||||
Reference in New Issue
Block a user