Commit fdff1322 authored by John Stowers's avatar John Stowers

Remove a gtk bug workaround

parent 4948a190
......@@ -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
......@@ -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)),
)
......@@ -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:
......
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