Remove the ability to set a custom border
This just doesn't work the way a user would expect under gtk3 so go ahead and remove it.
This commit is contained in:
parent
b37564a4cc
commit
e86e11044d
@ -62,7 +62,6 @@ class MainWindow( object ):
|
||||
self.window.get_window().set_decorations(Gdk.WMDecoration.BORDER)
|
||||
self.window.set_title("")
|
||||
self.paneholder = builder.get_object( "paneholder" )
|
||||
self.border = builder.get_object( "border" )
|
||||
|
||||
builder.connect_signals(self)
|
||||
|
||||
@ -86,10 +85,8 @@ class MainWindow( object ):
|
||||
self.settings.connect( "changed::start-with-favorites", self.toggleStartWithFavorites )
|
||||
self.settings.connect( "changed::tooltips-enabled", self.toggleTooltipsEnabled )
|
||||
self.settings.connect( "changed::use-custom-color", self.toggleUseCustomColor )
|
||||
self.settings.connect( "changed::custom-border-color", self.toggleCustomBorderColor )
|
||||
self.settings.connect( "changed::custom-heading-color", self.toggleCustomHeadingColor )
|
||||
self.settings.connect( "changed::custom-color", self.toggleCustomBackgroundColor )
|
||||
self.settings.connect( "changed::border-width", self.toggleBorderWidth )
|
||||
|
||||
self.getSetGSettingEntries()
|
||||
|
||||
@ -126,18 +123,10 @@ class MainWindow( object ):
|
||||
def toggleStartWithFavorites( self, settings, key, args = None ):
|
||||
self.startWithFavorites = settings.get_boolean(key)
|
||||
|
||||
def toggleBorderWidth( self, settings, key, args = None ):
|
||||
self.borderwidth = settings.get_int(key)
|
||||
self.SetupMintMenuBorder()
|
||||
|
||||
def toggleUseCustomColor( self, settings, key, args = None ):
|
||||
self.usecustomcolor = settings.get_boolean(key)
|
||||
self.loadTheme()
|
||||
|
||||
def toggleCustomBorderColor( self, settings, key, args = None ):
|
||||
self.custombordercolor = settings.get_string(key)
|
||||
self.SetupMintMenuBorder()
|
||||
|
||||
def toggleCustomBackgroundColor( self, settings, key, args = None):
|
||||
self.customcolor = settings.get_string(key)
|
||||
self.SetPaneColors( self.panesToColor )
|
||||
@ -153,24 +142,12 @@ class MainWindow( object ):
|
||||
self.usecustomcolor = self.settings.get_boolean( "use-custom-color" )
|
||||
self.customcolor = self.settings.get_string( "custom-color" )
|
||||
self.customheadingcolor = self.settings.get_string( "custom-heading-color" )
|
||||
self.custombordercolor = self.settings.get_string( "custom-border-color" )
|
||||
self.borderwidth = self.settings.get_int( "border-width" )
|
||||
self.offset = self.settings.get_int( "offset" )
|
||||
self.enableTooltips = self.settings.get_boolean( "tooltips-enabled" )
|
||||
self.startWithFavorites = self.settings.get_boolean( "start-with-favorites" )
|
||||
|
||||
self.globalEnableTooltips = self.panelSettings.get_boolean( "tooltips-enabled" )
|
||||
|
||||
def SetupMintMenuBorder( self, color = None ):
|
||||
context = self.window.get_style_context()
|
||||
if self.usecustomcolor:
|
||||
borderColor = Gdk.RGBA()
|
||||
borderColor.parse( self.custombordercolor )
|
||||
self.window.override_background_color( context.get_state(), borderColor )
|
||||
elif color is not None:
|
||||
self.window.override_background_color( context.get_state(), color )
|
||||
self.border.set_padding( self.borderwidth, self.borderwidth, self.borderwidth, self.borderwidth )
|
||||
|
||||
def PopulatePlugins( self ):
|
||||
self.panesToColor = [ ]
|
||||
self.headingsToColor = [ ]
|
||||
@ -337,14 +314,12 @@ class MainWindow( object ):
|
||||
|
||||
fgColor = context.get_color( context.get_state() )
|
||||
bgColor = context.get_background_color( context.get_state() )
|
||||
borderColor = context.get_border_color( context.get_state() )
|
||||
|
||||
return { "fg": fgColor, "bg": bgColor, "border": borderColor }
|
||||
return { "fg": fgColor, "bg": bgColor }
|
||||
|
||||
def loadTheme( self ):
|
||||
colors = self.getDefaultColors()
|
||||
self.SetPaneColors( self.panesToColor, colors["bg"] )
|
||||
self.SetupMintMenuBorder( colors["border"] )
|
||||
self.SetHeadingStyle( self.headingsToColor )
|
||||
|
||||
def SetPaneColors( self, items, color = None ):
|
||||
|
@ -542,58 +542,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">8</property>
|
||||
<property name="column_spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Border width:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="borderWidth">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="climb_rate">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label25">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">px</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@ -693,31 +642,6 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="borderColorLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Borders:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="borderColor">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="backgroundColorLabel">
|
||||
<property name="visible">True</property>
|
||||
@ -728,7 +652,7 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -740,7 +664,7 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -752,7 +676,7 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -769,7 +693,7 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -58,9 +58,6 @@ class mintMenuConfig( object ):
|
||||
self.builder.get_object("use_apt").set_label(_("Search for packages to install"))
|
||||
self.builder.get_object("swapGeneric").set_label(_("Swap name and generic name"))
|
||||
|
||||
self.builder.get_object("label11").set_text(_("Border width:"))
|
||||
self.builder.get_object("label25").set_text(_("pixels"))
|
||||
|
||||
self.builder.get_object("buttonTextLabel").set_text(_("Button text:"))
|
||||
self.builder.get_object("label1").set_text(_("Options"))
|
||||
self.builder.get_object("applicationsLabel").set_text(_("Applications"))
|
||||
@ -72,7 +69,6 @@ class mintMenuConfig( object ):
|
||||
|
||||
self.builder.get_object("backgroundColorLabel").set_text(_("Background:"))
|
||||
self.builder.get_object("headingColorLabel").set_text(_("Headings:"))
|
||||
self.builder.get_object("borderColorLabel").set_text(_("Borders:"))
|
||||
self.builder.get_object("themeLabel").set_text(_("Theme:"))
|
||||
|
||||
#self.builder.get_object("applicationsLabel").set_text(_("Applications"))
|
||||
@ -131,13 +127,10 @@ class mintMenuConfig( object ):
|
||||
self.placesIconSize = self.builder.get_object( "placesIconSize" )
|
||||
self.systemIconSize = self.builder.get_object( "systemIconSize" )
|
||||
self.favCols = self.builder.get_object( "numFavCols" )
|
||||
self.borderWidth = self.builder.get_object( "borderWidth" )
|
||||
self.useCustomColors = self.builder.get_object( "useCustomColors" )
|
||||
self.backgroundColor = self.builder.get_object( "backgroundColor" )
|
||||
self.borderColor = self.builder.get_object( "borderColor" )
|
||||
self.headingColor = self.builder.get_object( "headingColor" )
|
||||
self.backgroundColorLabel = self.builder.get_object( "backgroundColorLabel" )
|
||||
self.borderColorLabel = self.builder.get_object( "borderColorLabel" )
|
||||
self.headingColorLabel = self.builder.get_object( "headingColorLabel" )
|
||||
self.showButtonIcon = self.builder.get_object( "showButtonIcon" )
|
||||
self.enableInternetSearch = self.builder.get_object( "enableInternetSearch" )
|
||||
@ -215,11 +208,9 @@ class mintMenuConfig( object ):
|
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "int", "icon-size", self.placesIconSize, "value-changed", self.placesIconSize.set_value, self.placesIconSize.get_value )
|
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "int", "icon-size", self.systemIconSize, "value-changed", self.systemIconSize.set_value, self.systemIconSize.get_value )
|
||||
|
||||
self.bindGSettingsValueToWidget( self.settings, "int", "border-width", self.borderWidth, "value-changed", self.borderWidth.set_value, self.borderWidth.get_value_as_int )
|
||||
self.bindGSettingsValueToWidget( self.settings, "bool", "use-custom-color", self.useCustomColors, "toggled", self.useCustomColors.set_active, self.useCustomColors.get_active )
|
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-color", self.backgroundColor, "color-set", self.backgroundColor.set_rgba, self.getBackgroundColor )
|
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-heading-color", self.headingColor, "color-set", self.headingColor.set_rgba, self.getHeadingColor )
|
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-border-color", self.borderColor, "color-set", self.borderColor.set_rgba, self.getBorderColor )
|
||||
self.bindGSettingsValueToWidget( self.settings, "bool", "hide-applet-icon", self.showButtonIcon, "toggled", self.setShowButtonIcon, self.getShowButtonIcon )
|
||||
self.bindGSettingsValueToWidget( self.settings, "string", "applet-text", self.buttonText, "changed", self.buttonText.set_text, self.buttonText.get_text )
|
||||
self.bindGSettingsValueToWidget( self.settings, "string", "hot-key", self.hotkeyWidget, "accel-edited", self.hotkeyWidget.set_val, self.hotkeyWidget.get_val )
|
||||
@ -382,20 +373,14 @@ class mintMenuConfig( object ):
|
||||
|
||||
def toggleUseCustomColors( self, widget ):
|
||||
self.backgroundColor.set_sensitive( widget.get_active() )
|
||||
self.borderColor.set_sensitive( widget.get_active() )
|
||||
self.headingColor.set_sensitive( widget.get_active() )
|
||||
self.backgroundColorLabel.set_sensitive( widget.get_active() )
|
||||
self.borderColorLabel.set_sensitive( widget.get_active() )
|
||||
self.headingColorLabel.set_sensitive( widget.get_active() )
|
||||
|
||||
def getBackgroundColor( self ):
|
||||
color = self.backgroundColor.get_rgba()
|
||||
return self.gdkRGBAToString( color )
|
||||
|
||||
def getBorderColor( self ):
|
||||
color = self.borderColor.get_rgba()
|
||||
return self.gdkRGBAToString( color )
|
||||
|
||||
def getHeadingColor( self ):
|
||||
color = self.headingColor.get_rgba()
|
||||
return self.gdkRGBAToString( color )
|
||||
|
@ -32,12 +32,6 @@
|
||||
<description></description>
|
||||
</key>
|
||||
|
||||
<key type="i" name="border-width">
|
||||
<default>1</default>
|
||||
<summary></summary>
|
||||
<description></description>
|
||||
</key>
|
||||
|
||||
<key type="i" name="offset">
|
||||
<default>0</default>
|
||||
<summary></summary>
|
||||
@ -85,12 +79,6 @@
|
||||
<summary></summary>
|
||||
<description></description>
|
||||
</key>
|
||||
|
||||
<key type="s" name="custom-border-color">
|
||||
<default>"#DEDEDE"</default>
|
||||
<summary></summary>
|
||||
<description></description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user