mirror of https://github.com/daleclack/My_GtkUi
Add style for finder
This commit is contained in:
parent
30a1399689
commit
0d61f0a47e
|
@ -35,6 +35,8 @@ set(RESOURCE_LIST
|
|||
menubar.xml
|
||||
mainmenu.xml
|
||||
stack.ui
|
||||
style.css
|
||||
reset.css
|
||||
icons/16x16/actions/My_GtkUI.png
|
||||
icons/48x48/actions/My_GtkUI.png)
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
</item>
|
||||
<item>
|
||||
<attribute name="label">Change Background</attribute>
|
||||
<attribute name="action">win.back</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label">Refresh</attribute>
|
||||
<attribute name="action">win.refresh</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
|
|
|
@ -305,12 +305,12 @@
|
|||
<attribute name="label">Network</attribute>
|
||||
</item>
|
||||
<submenu>
|
||||
<attribute name="label">iDisk</attribute>
|
||||
<attribute name="label">iCloud</attribute>
|
||||
<item>
|
||||
<attribute name="label">My iDisk</attribute>
|
||||
<attribute name="label">My iCloud</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label">Other User's iDisk</attribute>
|
||||
<attribute name="label">Other User's iCloud</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label">Other User's Public Folder</attribute>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/* @import this colorsheet to get the default values for every property.
|
||||
* This is useful when writing special CSS tests that should not be
|
||||
* inluenced by themes - not even the default ones.
|
||||
* Keep in mind that the output will be very ugly and not look like
|
||||
* anything GTK.
|
||||
* Also, when adding new style properties, please add them here.
|
||||
*/
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
您可以在这里输入任何 GTK+ 可识别的 CSS 规则。
|
||||
您可以点击上面的“暂停”按钮来暂时停用这个自定义 CSS。
|
||||
|
||||
变更会立即应用到全局,影响整个应用程序。
|
||||
*/
|
||||
|
||||
@import url("resource://org/gtk/daleclack/reset.css");
|
||||
|
||||
box{
|
||||
background-color:alpha(white,0.7);
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
#include "MyWin.hh"
|
||||
#include "winpe.xpm"
|
||||
#include <iostream>
|
||||
|
||||
MyWin::MyWin()
|
||||
:menubox(Gtk::ORIENTATION_HORIZONTAL,0)
|
||||
|
|
|
@ -74,6 +74,12 @@ MyFinder::MyFinder()
|
|||
pack_end(timer_button, Gtk::PACK_SHRINK);
|
||||
|
||||
mytimer = Glib::signal_timeout().connect(sigc::mem_fun(*this, &MyFinder::time_out), 1000);
|
||||
|
||||
//Add Style for MyFinder
|
||||
provider = Gtk::CssProvider::create();
|
||||
provider->load_from_resource("/org/gtk/daleclack/style.css");
|
||||
auto style = get_style_context();
|
||||
style->add_provider(provider,G_MAXUINT);
|
||||
}
|
||||
|
||||
bool MyFinder::time_out()
|
||||
|
|
|
@ -14,10 +14,14 @@ private:
|
|||
Gtk::MenuButton timer_button;
|
||||
Gtk::Popover time_popover;
|
||||
Gtk::Calendar calender;
|
||||
Gtk::VolumeButton btn_vol;
|
||||
|
||||
// Get Menu
|
||||
Glib::RefPtr<Gio::Menu> get_menu(Glib::RefPtr<Gtk::Builder> &builder, const Glib::ustring &id);
|
||||
|
||||
//Style for finder
|
||||
Glib::RefPtr<Gtk::CssProvider> provider;
|
||||
|
||||
//Timer
|
||||
sigc::connection mytimer;
|
||||
bool time_out();
|
||||
|
|
Loading…
Reference in New Issue