[gnome-tweak-tool] Remove a gtk bug workaround
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Remove a gtk bug workaround
- Date: Thu, 31 Mar 2011 10:40:05 +0000 (UTC)
commit fdff13228829b605b0fc517f9136b76361b3345a
Author: John Stowers <john stowers gmail com>
Date: Thu Mar 31 23:39:59 2011 +1300
Remove a gtk bug workaround
README | 4 ----
gtweak/tweaks/tweak_interface.py | 10 ++++++----
gtweak/tweakview.py | 23 +++++++++++------------
3 files changed, 17 insertions(+), 20 deletions(-)
---
diff --git a/README b/README
index a78cf00..8d6d9d4 100644
--- a/README
+++ b/README
@@ -17,8 +17,4 @@ TODO
* I'm not sure if the TweakGroup layer is necessary, and it makes
it hard to categorise things. Perhaps go to a named factory approach
* Do some more things lazily to improve startup speed
- * Make the vbox where tweaks go a scrolled window but theme it so it no
- longer has a white background
- - this is a theme / gtk bug, I think
- https://bugzilla.gnome.org/show_bug.cgi?id=644268
diff --git a/gtweak/tweaks/tweak_interface.py b/gtweak/tweaks/tweak_interface.py
index cb0a037..7d14d6d 100644
--- a/gtweak/tweaks/tweak_interface.py
+++ b/gtweak/tweaks/tweak_interface.py
@@ -21,7 +21,7 @@ from gi.repository import Gtk
import gtweak
from gtweak.tweakmodel import TweakGroup
-from gtweak.widgets import GSettingsSwitchTweak, GSettingsComboTweak
+from gtweak.widgets import GSettingsSwitchTweak, GSettingsComboTweak, build_horizontal_sizegroup
class ThemeSwitcher(GSettingsComboTweak):
""" Only shows themes that have variations for gtk+-3 and gtk+-2 """
@@ -47,12 +47,14 @@ class IconThemeSwitcher(GSettingsComboTweak):
"icon-theme",
[(t, t) for t in os.listdir(iconthemedir)],
**options)
-
+
+sg = build_horizontal_sizegroup()
+
TWEAK_GROUPS = (
TweakGroup(
"Interface",
GSettingsSwitchTweak("org.gnome.desktop.interface", "menus-have-icons"),
GSettingsSwitchTweak("org.gnome.desktop.interface", "buttons-have-icons"),
- ThemeSwitcher(),
- IconThemeSwitcher()),
+ ThemeSwitcher(size_group=sg),
+ IconThemeSwitcher(size_group=sg)),
)
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index b2dac21..5aa79f6 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -46,18 +46,17 @@ class TweakView:
tweak_container = builder.get_object('tweak_container')
tweak_box = Gtk.VBox(spacing=10)
- if not gtweak.ENABLE_TEST:
- #works, but window grows
- tweak_container.add(tweak_box)
- else:
- #This is what I want to work the above is fixed
- sw = Gtk.ScrolledWindow()
- sw.props.shadow_type = Gtk.ShadowType.NONE
- vp = Gtk.Viewport()
- vp.props.shadow_type = Gtk.ShadowType.NONE
- sw.add(vp)
- vp.add(tweak_box)
- tweak_container.add(sw)
+
+ #FIXME: I may as well do this in the glade file now that
+ #https://bugzilla.gnome.org/show_bug.cgi?id=644268 is fixed
+ sw = Gtk.ScrolledWindow()
+ sw.props.shadow_type = Gtk.ShadowType.NONE
+ sw.props.hscrollbar_policy = Gtk.PolicyType.NEVER
+ vp = Gtk.Viewport()
+ vp.props.shadow_type = Gtk.ShadowType.NONE
+ sw.add(vp)
+ vp.add(tweak_box)
+ tweak_container.add(sw)
#add all tweaks
for t in self._model.tweaks:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]