Removed support for opacity

It was buggy and only worked with composition.

It might be reintroduced after the port to GTK3.
This commit is contained in:
Clement Lefebvre 2016-06-21 16:55:19 +01:00
parent 91690b9dea
commit e2a0fabff7
4 changed files with 1 additions and 69 deletions

View File

@ -108,7 +108,6 @@ class MainWindow( object ):
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.settings.connect( "changed::opacity", self.toggleOpacity )
self.getSetGSettingEntries()
@ -149,10 +148,6 @@ class MainWindow( object ):
self.borderwidth = settings.get_int(key)
self.SetupMintMenuBorder()
def toggleOpacity( self, settings, key, args = None ):
self.opacity = settings.get_int(key)
self.SetupMintMenuOpacity()
def toggleUseCustomColor( self, settings, key, args = None ):
self.usecustomcolor = settings.get_boolean(key)
self.loadTheme()
@ -178,7 +173,6 @@ class MainWindow( object ):
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.opacity = self.settings.get_int( "opacity" )
self.offset = self.settings.get_int( "offset" )
self.enableTooltips = self.settings.get_boolean( "tooltips-enabled" )
self.startWithFavorites = self.settings.get_boolean( "start-with-favorites" )
@ -192,12 +186,6 @@ class MainWindow( object ):
self.window.modify_bg( Gtk.StateType.NORMAL, defaultStyle.lookup_color('bg_color')[1] )
self.border.set_padding( self.borderwidth, self.borderwidth, self.borderwidth, self.borderwidth )
def SetupMintMenuOpacity( self ):
print "Opacity is: " + str(self.opacity)
opacity = float(self.opacity) / float(100)
print "Setting opacity to: " + str(opacity)
self.window.set_opacity(opacity)
def detect_desktop_environment (self):
self.de = "mate"
try:
@ -445,7 +433,7 @@ class MainWindow( object ):
# Hack for opacity not showing on first composited draw
if self.firstTime:
self.firstTime = False
self.SetupMintMenuOpacity()
self.window.set_opacity(1.0)
self.window.window.focus( Gdk.CURRENT_TIME )

View File

@ -609,18 +609,6 @@
<property name="label" translatable="yes">Border width:</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Opacity:</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="borderWidth">
<property name="visible">True</property>
@ -639,39 +627,6 @@
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="opacity">
<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">&#x25CF;</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">adjustment2</property>
<property name="climb_rate">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">%</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label25">
<property name="visible">True</property>

View File

@ -60,9 +60,6 @@ class mintMenuConfig( object ):
self.builder.get_object("label11").set_text(_("Border width:"))
self.builder.get_object("label25").set_text(_("pixels"))
self.builder.get_object("label8").set_text(_("Opacity:"))
self.builder.get_object("label9").set_text("%")
self.builder.get_object("buttonTextLabel").set_text(_("Button text:"))
self.builder.get_object("label1").set_text(_("Options"))
self.builder.get_object("label23").set_text(_("Applications"))
@ -134,7 +131,6 @@ class mintMenuConfig( object ):
self.systemIconSize = self.builder.get_object( "systemIconSize" )
self.favCols = self.builder.get_object( "numFavCols" )
self.borderWidth = self.builder.get_object( "borderWidth" )
self.opacity = self.builder.get_object( "opacity" )
self.useCustomColors = self.builder.get_object( "useCustomColors" )
self.backgroundColor = self.builder.get_object( "backgroundColor" )
self.borderColor = self.builder.get_object( "borderColor" )
@ -217,7 +213,6 @@ class mintMenuConfig( object ):
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, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.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_color, self.getBackgroundColor )
self.bindGSettingsValueToWidget( self.settings, "color", "custom-heading-color", self.headingColor, "color-set", self.headingColor.set_color, self.getHeadingColor )

View File

@ -38,12 +38,6 @@
<description></description>
</key>
<key type="i" name="opacity">
<default>98</default>
<summary></summary>
<description></description>
</key>
<key type="i" name="offset">
<default>0</default>
<summary></summary>