1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

ClipboardHistory: Replace IconWidget with GUI::Image

This commit is contained in:
Hüseyin ASLITÜRK 2020-06-13 01:37:55 +03:00 committed by Andreas Kling
parent 56e82a2c07
commit 3a676c6fd2
4 changed files with 5 additions and 90 deletions

View file

@ -25,8 +25,8 @@
*/
#include "ClipboardHistoryModel.h"
#include "IconWidget.h"
#include <LibGUI/Application.h>
#include <LibGUI/Image.h>
#include <LibGUI/TableView.h>
#include <LibGUI/Window.h>
@ -55,8 +55,10 @@ int main(int argc, char* argv[])
auto applet_window = GUI::Window::construct();
applet_window->set_title("ClipboardHistory");
applet_window->set_window_type(GUI::WindowType::MenuApplet);
auto& icon = applet_window->set_main_widget<IconWidget>();
icon.on_click = [&main_window = *main_window] {
auto& icon = applet_window->set_main_widget<GUI::Image>();
icon.load_from_file("/res/icons/clipboard.png");
icon.set_fill_with_background_color(true);
icon.on_click = [& main_window = *main_window] {
main_window.show();
};
applet_window->resize(16, 16);