added style

This commit is contained in:
DYefremov
2019-10-29 13:39:11 +03:00
parent 27f60bcea2
commit e11f68e3bd
3 changed files with 17 additions and 2 deletions

View File

@@ -277,6 +277,11 @@ class Application(Gtk.Application):
d_elements = (self._SERVICE_ELEMENTS, self._BOUQUET_ELEMENTS, self._COMMONS_ELEMENTS, self._FAV_ELEMENTS,
self._FAV_ENIGMA_ELEMENTS, self._FAV_IPTV_ELEMENTS, self._LOCK_HIDE_ELEMENTS)
self._tool_elements = {k: builder.get_object(k) for k in set(chain.from_iterable(d_elements))}
# Style
self._style_provider = Gtk.CssProvider()
self._style_provider.load_from_path(UI_RESOURCES_PATH + "style.css")
self._status_bar_box.get_style_context().add_provider_for_screen(Gdk.Screen.get_default(), self._style_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER)
def do_startup(self):
Gtk.Application.do_startup(self)

View File

@@ -28,6 +28,7 @@ Author: Dmitriy Yefremov
-->
<interface>
<requires lib="gtk+" version="3.16"/>
<!-- interface-css-provider-path style.css -->
<!-- interface-license-type mit -->
<!-- interface-name DemonEditor -->
<!-- interface-description Enigma2 channel and satellites list editor for GNU/Linux. -->
@@ -2797,7 +2798,7 @@ Author: Dmitriy Yefremov
</child>
<child>
<object class="GtkBox" id="status_bar_box">
<property name="height_request">35</property>
<property name="height_request">30</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="receiver_info_box">
@@ -2921,9 +2922,13 @@ Author: Dmitriy Yefremov
</child>
<child>
<object class="GtkButton" id="play_current_service_button">
<property name="name">status-bar-button</property>
<property name="can_focus">False</property>
<property name="focus_on_click">False</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Play</property>
<property name="halign">center</property>
<property name="valign">center</property>
<signal name="clicked" handler="on_watch" swapped="no"/>
<child>
<object class="GtkImage" id="play_current_service_image">

View File

@@ -1,3 +1,8 @@
#digit-entry {
border-color: Red;
}
#status-bar-button {
padding: 1px;
margin: 1px;
}