Add more icons on finder

This commit is contained in:
daleclack 2022-01-27 17:09:24 +08:00
parent 0d61f0a47e
commit 1c448bbddb
10 changed files with 87 additions and 3 deletions

View File

@ -37,8 +37,14 @@ set(RESOURCE_LIST
stack.ui
style.css
reset.css
icons/16x16/actions/audio-speakers.svg
icons/16x16/actions/battery.svg
icons/16x16/actions/computer.svg
icons/16x16/actions/folder-wifi.svg
icons/16x16/actions/My_GtkUI.png
icons/48x48/actions/My_GtkUI.png)
icons/16x16/actions/open-menu.svg
icons/48x48/actions/My_GtkUI.png
icons/scalable/status/edit-find.svg)
compile_gresources(RESOURCE_FILE
XML_OUT

View File

@ -0,0 +1,14 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#363636; } .ColorScheme-Highlight { color:#5294e2; }</style>
</defs>
<g style="fill:currentColor" class="ColorScheme-Text">
<rect y="6" width="5" height="4" ry="1"/>
<path d="m6 3-3 3v4l3 3z"/>
<g>
<path d="m13.139 1.4277c-0.54546-0.42773-1.1387 0.22461-0.68359 0.73242 1.6202 1.5104 2.5416 3.6249 2.5449 5.8398-0.0026 2.2205-0.92793 4.3401-2.5547 5.8516-0.44531 0.47165 0.18064 1.1484 0.67774 0.72852 1.8304-1.6992 2.8725-4.0825 2.877-6.5801-0.0026-2.4925-1.0386-4.8722-2.8613-6.5723z"/>
<path d="m10.775 2.8887c-0.58741-0.53488-1.1988 0.22518-0.68359 0.73242 1.2147 1.1326 1.9056 2.7181 1.9082 4.3789-0.0019 1.6654-0.69594 3.2551-1.916 4.3887-0.46835 0.44623 0.17346 1.1467 0.67969 0.72852 1.423-1.3216 2.233-3.1751 2.2363-5.1172-0.0019-1.9383-0.80739-3.789-2.2246-5.1113z"/>
<path d="m8.4102 4.3496c-0.52095-0.49369-1.1551 0.22003-0.68359 0.73047 0.81045 0.75501 1.2715 1.8123 1.2734 2.9199-0.00128 1.1103-0.46396 2.1701-1.2773 2.9258-0.47259 0.42993 0.13957 1.1522 0.67969 0.73047 1.0168-0.94425 1.5955-2.2686 1.5977-3.6562-0.00172-1.3844-0.57738-2.7062-1.5898-3.6504z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,10 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#363636; } .ColorScheme-Highlight { color:#5294e2; }</style>
</defs>
<g style="fill:currentColor" class="ColorScheme-Text">
<path d="m15 6.5879v2.8242a1.5 1.5 0 0 0 1-1.4121 1.5 1.5 0 0 0-1-1.4121z"/>
<rect x="2" y="6" width="10" height="4" ry="0"/>
<path d="m2 4c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2h10c1.108 0 2-0.892 2-2v-4c0-1.108-0.892-2-2-2h-10zm0 1h10c0.554 0 1 0.446 1 1v4c0 0.554-0.446 1-1 1h-10c-0.554 0-1-0.446-1-1v-4c0-0.554 0.446-1 1-1z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 643 B

View File

@ -0,0 +1,7 @@
<svg width="16" height="16" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#363636; } .ColorScheme-Highlight { color:#5294e2; }</style>
</defs>
<path d="m4.5 14h7c0.277 0 0.5 0.223 0.5 0.5s-0.223 0.5-0.5 0.5h-7c-0.277 0-0.5-0.223-0.5-0.5s0.223-0.5 0.5-0.5z" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m2 2c-1.108 0-2 0.892-2 2v7c0 1.108 0.892 2 2 2h12c1.108 0 2-0.892 2-2v-7c0-1.108-0.892-2-2-2zm0 1h12c0.554 0 1 0.446 1 1v7c0 0.554-0.446 1-1 1h-12c-0.554 0-1-0.446-1-1v-7c0-0.554 0.446-1 1-1z" style="fill:currentColor" class="ColorScheme-Text"/>
</svg>

After

Width:  |  Height:  |  Size: 630 B

View File

@ -0,0 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#363636; }</style>
</defs>
<path d="m7.9996 3.0212c-2.6432 0-5.1397 1.1665-6.85 3.2009a0.63845 0.63845 0 0 0 0.49005 1.0491c0.18222 0 0.36305-0.077304 0.48971-0.22742 1.4657-1.7438 3.6057-2.7446 5.8703-2.7446s4.4046 1.0012 5.8703 2.7446c0.12631 0.15116 0.30714 0.22777 0.48971 0.22777a0.63776 0.63776 0 0 0 0.4897-1.0495c-1.7097-2.0344-4.2068-3.2009-6.8504-3.2009zm0 2.707c-1.8877 0-3.6709 0.83378-4.8922 2.2863a0.63894 0.63894 0 1 0 0.97838 0.82204 5.1055 5.1055 0 0 1 3.9135-1.8301c1.5102 0 2.9369 0.66744 3.9142 1.8301 0.12631 0.15116 0.30784 0.22777 0.48971 0.22777a0.63845 0.63845 0 0 0 0.48833-1.0495c-1.2217-1.4529-3.0038-2.2867-4.8922-2.2867zm0 2.8126a3.8272 3.8272 0 0 0-2.9358 1.3704 0.63845 0.63845 0 0 0 0.079374 0.90038 0.63603 0.63603 0 0 0 0.90038-0.07765 2.5507 2.5507 0 0 1 1.9561-0.91453c0.75475 0 1.4677 0.33303 1.9568 0.91453a0.63707 0.63707 0 0 0 0.90004 0.07765 0.63845 0.63845 0 0 0 0.07937-0.90038 3.8272 3.8272 0 0 0-2.9362-1.3704zm-0.054524 2.4264c-0.49971 0.04832-0.98079 0.42172-0.99736 0.97838a1.0522 1.0522 0 0 0 2.1041 0c-0.088692-0.74716-0.6067-1.026-1.1068-0.97838z" style="fill:currentColor" class="ColorScheme-Text"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,3 @@
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="m3 3h10v2h-10zm0 4h10v2h-10zm0 4h10v2h-10z" fill="#474747"/>
</svg>

After

Width:  |  Height:  |  Size: 143 B

View File

@ -0,0 +1,6 @@
<svg width="16" height="16" enable-background="new" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="rotate(45 7.7071 8.7071)" fill="#363636">
<path d="m6 3a5 5 0 0 0-5 5 5 5 0 0 0 5 5 5 5 0 0 0 5-5 5 5 0 0 0-5-5zm0 1a4 4 0 0 1 4 4 4 4 0 0 1-4 4 4 4 0 0 1-4-4 4 4 0 0 1 4-4z"/>
<rect x="10" y="7.5" width="7" height="1" stroke-width=".93541"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 377 B

View File

@ -368,6 +368,7 @@
<menu id="menu_help">
<item>
<attribute name="label">About</attribute>
<attribute name="action">win.about</attribute>
</item>
</menu>
</interface>
</interface>

View File

@ -67,6 +67,16 @@ MyFinder::MyFinder()
calender.set_margin_start(5);
calender.set_margin_end(5);
//Menu button
menu_button.set_image_from_icon_name("open-menu");
menu_button.set_relief(Gtk::RELIEF_NONE);
pack_end(menu_button,Gtk::PACK_SHRINK);
//Find Button
find_button.set_image_from_icon_name("edit-find");
find_button.set_relief(Gtk::RELIEF_NONE);
pack_end(find_button,Gtk::PACK_SHRINK);
// Timer
timer_button.set_label("2022/1/23 18:32");
timer_button.set_relief(Gtk::RELIEF_NONE);
@ -75,6 +85,26 @@ MyFinder::MyFinder()
mytimer = Glib::signal_timeout().connect(sigc::mem_fun(*this, &MyFinder::time_out), 1000);
//Battery Button
battery_button.set_image_from_icon_name("battery");
battery_button.set_relief(Gtk::RELIEF_NONE);
pack_end(battery_button,Gtk::PACK_SHRINK);
//NetWork Button
network_button.set_image_from_icon_name("folder-wifi");
network_button.set_relief(Gtk::RELIEF_NONE);
pack_end(network_button,Gtk::PACK_SHRINK);
//Audio Button
audio_button.set_image_from_icon_name("audio-speakers");
audio_button.set_relief(Gtk::RELIEF_NONE);
pack_end(audio_button,Gtk::PACK_SHRINK);
//Monitor Button
screen_button.set_image_from_icon_name("computer");
screen_button.set_relief(Gtk::RELIEF_NONE);
pack_end(screen_button,Gtk::PACK_SHRINK);
//Add Style for MyFinder
provider = Gtk::CssProvider::create();
provider->load_from_resource("/org/gtk/daleclack/style.css");

View File

@ -14,7 +14,8 @@ private:
Gtk::MenuButton timer_button;
Gtk::Popover time_popover;
Gtk::Calendar calender;
Gtk::VolumeButton btn_vol;
Gtk::Button find_button, menu_button, battery_button,
network_button, screen_button, audio_button;
// Get Menu
Glib::RefPtr<Gio::Menu> get_menu(Glib::RefPtr<Gtk::Builder> &builder, const Glib::ustring &id);