Merge lp:~victored/granite/thin-paned-gtk-3-13 into lp:~elementary-pantheon/granite/granite
Status: | Rejected |
---|---|
Rejected by: | Victor Martinez |
Proposed branch: | lp:~victored/granite/thin-paned-gtk-3-13 |
Merge into: | lp:~elementary-pantheon/granite/granite |
Diff against target: |
168 lines (+46/-19) 2 files modified
lib/Widgets/ThinPaned.vala (+44/-18) lib/style-classes.vala (+2/-1) |
To merge this branch: | bzr merge lp:~victored/granite/thin-paned-gtk-3-13 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Victor Martinez (community) | Disapprove | ||
Review via email: mp+224047@code.launchpad.net |
Commit message
Disable ThinPaned's features with Gtk 3.13, to make it act like a normal GtkPaned.
The style class "thin-paned" will also be present in ThinPaned with Gtk 3.13+
Description of the change
GTK+ 3.13 supports defining overlay pane separator handles from the theme, and ThinPaned will be deprecated in favor of that.
As it seems we're still unsure whether we will be shipping GTK+ 3.12 or 3.14 in Freya, I've added a runtime check to ThinPaned to make the same Granite binary work with both versions.
Basically what this does is disabling ThinPaned's overlay GdkWindow, handle-drawing code, and event handling, so it doesn't override the behavior provided by GtkPaned in GTK+ 3.13.
Notice that ThinPaned adds the style class "thin-paned" with GTK+ 3.13, which can be used as follows:
/* this will match the entire GtkPaned widget */
.thin-paned {
-GtkPaned-
border-width: 0;
/*
the handle's margins are applied to the entire paned and not the
pane-separator class, as that one is only used for drawing purposes
*/
/* additional invisible pixels to add above pane separator for vertically-stacked panes */
margin-top: 3px;
/* additional invisible pixels to add below pane separator for vertically-stacked panes */
margin-bottom: 2px;
/* additional invisible pixels to add on left side of the pane separator for horizontally-
margin-left: 2px; /* avoid conflicting with scrollbar */
/* additional invisible pixels to add on right side of the pane separator for horizontally-
margin-right: 4px;
/* optionally, we could simply use 'margin' */
margin: 3px;
}
/* theme pane separator */
.thin-paned.
background-
border-width: 0;
}
Unmerged revisions
- 742. By Victor Martinez
-
Add runtime check for GTK+ 3.13 or newer, and make ThinPaned behave as a normal GtkPaned with a style class called "thin-paned".
ThinPaned behaves as usual with Gtk 3.12 or older.
This branch is no longer relevant, as it seems we'll simply wait for the release of GTK+ 3.14.
Let's do a clean deprecation when the time comes.