#3388 closed defect (fixed)
The toolbar height with the gtk3 theme is smaller than in the gtk2 theme
Reported by: | godiard | Owned by: | godiard |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Unspecified |
Severity: | Major | Keywords: | |
Cc: | manuq, erikos | Distribution/OS: | OLPC |
Bug Status: | Unconfirmed |
Description
Testing in os5 with the latest rpms. See images attached
Attachments (11)
Change History (23)
Changed 12 years ago by godiard
Changed 12 years ago by godiard
Changed 12 years ago by godiard
comment:1 Changed 12 years ago by erikos
- Distribution/OS changed from Unspecified to OLPC
- Milestone changed from Unspecified by Release Team to 0.96
- Severity changed from Unspecified to Major
comment:2 Changed 12 years ago by godiard
- Summary changed from The toolbar height with the gtk3 theme is small than in the gtk2 theme to The toolbar height with the gtk3 theme is smaller than in the gtk2 theme
comment:3 Changed 11 years ago by godiard
- Owner changed from erikos to godiard
- Status changed from new to assigned
comment:4 Changed 11 years ago by godiard
- Cc manuq erikos added
After doing many test I have found than changing:
diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em index 4323e6e..f9b01da 100644 --- a/gtk3/theme/gtk-widgets.css.em +++ b/gtk3/theme/gtk-widgets.css.em @@ -20,7 +20,7 @@ if scaling == "100": icon_base = 11 bullet_size = 9.5 font_height = 24 - default_padding = 6 + default_padding = 7 toolbutton_padding = 9 else: # About 72% of the XO size, adjusted so that eg. toolbuttons work xo = False
solve this ticket and #3407 !
Can anybody confirm?
Changed 11 years ago by godiard
Screenshot of Read (gtk3 activity) with the patch aplied in the theme
comment:5 Changed 11 years ago by godiard
Before trying this change, I have tried adding padding to the toolbar. It's possible solve the the toolbar size applying a padding of 3, but the problem is with the lines we use when the subpalette is down; the left, top and right sides of the button are separated of the lines drawn in the subtoolbar.
I couldn't find why the value of 7 is ok, when in the old (gtk2) theme 6 was the value selected. I found many differences, the button had a property inner-border, but apparently is set to 0. In the old theme there are also "fake" definitions as:
# We fake the default border in the theme GtkButton::default-border = { 0, 0, 0, 0 } GtkButton::default-outside-border = { 0, 0, 0, 0 } GtkButton::image-spacing = $subcell_size
or
style "toolbutton" { xthickness = 0 ythickness = 0 GtkButton::inner-border = { $toolbutton_padding, $toolbutton_padding, $toolbutton_padding, $toolbutton_padding } GtkWidget::focus-padding = 0 ... engine "sugar" { max_radius = 5.0 fake_padding = $default_padding } }
Another confussing issue is we have a variable toolbutton_padding but is only used to:
BrowseNotebook.notebook tab .button { border-radius: $(toolbutton_padding)px; } .toolbar GtkToolButton .button, SugarPaletteWindowWidget SugarRadioToolButton *, SugarPaletteWindowWidget GtkToolButton .button{ background-color: transparent; border-radius: $(toolbutton_padding)px; padding: $(default_padding)px; } SugarPaletteWindowWidget SugarRadioToolButton *:active { background-color: @button_grey; border-radius: $(toolbutton_padding)px; } .toolbar GtkToolButton .button:active { background-color: @button_grey; border-radius: $(toolbutton_padding)px; }
then should be better rename it to "border_radius"
In the same way, "default_padding" is used in:
.notebook { background-color: @selection_grey; padding: 0px; -GtkNotebook-tab-overlap: -2; -GtkNotebook-tab-curvature: $default_padding; } .toolbar GtkToolButton .button, SugarPaletteWindowWidget SugarRadioToolButton *, SugarPaletteWindowWidget GtkToolButton .button{ background-color: transparent; border-radius: $(toolbutton_padding)px; padding: $(default_padding)px; }
may be we should rename it.
But anyway all this does not explain why the value has not changed in the 75 theme. A rounding issue maybe?
comment:6 Changed 11 years ago by manuq
The last patch gets the correct toolbar height too, without changing the toolbutton_padding variables, and setting the same -GtkWidget-focus-padding and -GtkWidget-focus-line-width as the gtk2 theme.
comment:7 Changed 11 years ago by manuq
The problem with the second patch is that several widgets get a sorrounding line for the active state.
comment:8 Changed 11 years ago by erikos
Great work, and excellent explanation in the commit message, please go ahead.
Changed 11 years ago by manuq
This is a comparison of the current state of gtk3 (Browse) vs. gtk2 (Terminal).
comment:9 Changed 11 years ago by manuq
As the comparison above shows we are almost there, the secondary toolbar has 1px vertical border compared to the gtk2 one.
comment:10 Changed 11 years ago by manuq
- Milestone changed from 0.96 to 0.98
- Resolution set to fixed
- Status changed from assigned to closed
Pushed in ba44df1b and 8645e437 . The secondary toolbar 1px mistery should be fixed later in #4019 .
comment:11 Changed 10 years ago by dnarvaez
- Component changed from sugar-toolkit-gtk3 to Sugar
Left is terminal with gtk2 theme, right is Read with gtk3 theme