Commit 7549f2f9 authored by Diego Gangl's avatar Diego Gangl Committed by Alexandru Băluț

Preferences: Add padding/background to sidebar

parent 5c998b6a
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.16"/>
<object class="GtkDialog" id="dialog1">
......@@ -9,6 +9,9 @@
<property name="type_hint">dialog</property>
<signal name="configure-event" handler="_configureCb" swapped="no"/>
<signal name="response" handler="_response_cb" swapped="no"/>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
......@@ -184,8 +187,5 @@
<action-widgets>
<action-widget response="0">acceptButton</action-widget>
</action-widgets>
<child>
<placeholder/>
</child>
</object>
</interface>
......@@ -37,6 +37,7 @@ from pitivi.utils.loggable import Loggable
from pitivi.utils.ui import alter_style_class
from pitivi.utils.ui import fix_infobar
from pitivi.utils.ui import PADDING
from pitivi.utils.ui import PREFERENCES_CSS
from pitivi.utils.ui import SPACING
......@@ -93,6 +94,7 @@ class PreferencesDialog(Loggable):
self.__add_shortcuts_section()
self.__add_plugin_manager_section()
self.__setup_css()
self.dialog.set_transient_for(app.gui)
def run(self):
......@@ -101,6 +103,14 @@ class PreferencesDialog(Loggable):
self.dialog.run()
PreferencesDialog._instance = None
def __setup_css(self):
css_provider = Gtk.CssProvider()
css_provider.load_from_data(PREFERENCES_CSS.encode('UTF-8'))
screen = Gdk.Screen.get_default()
style_context = self.app.gui.get_style_context()
style_context.add_provider_for_screen(screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
# Public API
@property
def settings_sections(self):
......
......@@ -228,6 +228,17 @@ EDITOR_PERSPECTIVE_CSS = """
'trimbar_focused': os.path.join(get_pixmap_dir(), "trimbar-focused.png")})
PREFERENCES_CSS = """
.sidebar list {
background: rgb(45, 45, 45);
}
.sidebar row {
padding: 10px 40px 10px 4px;
}
"""
def format_framerate_value(framerate):
"""Formats the framerate or returns 0 if unable to determine it."""
if isinstance(framerate, DiscovererVideoInfo):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment