When moving a page around, all children changing their position
need to be notified.
There are still other places where proper notification is missing
(drag 'n drop, etc.)
https://bugzilla.gnome.org/show_bug.cgi?id=669116
When doing DnD between windows the tab label is set as the child of
the DnD info window. If this is happening the remove method of
GtkNotebook should not unparent the tab label, since it's been already
unparented, belongs to the DnD window and will be properly destroyed
when the DnD is over.
https://bugzilla.gnome.org/show_bug.cgi?id=639875
Instead of taking the first page and trying to adjust the rect with
random padding values, take the current page, as it's always guaranteed
to be at least as tall as inactive tabs.
This fixes some annoying 1px drawing artifacts while switching tabs when
the theme disables notebook padding.
https://bugzilla.gnome.org/show_bug.cgi?id=664494
When the active page is switched, it's important
gtk_notebook_pages_allocate() is called after the bulk of
gtk_notebook_real_switch_page() is run, as the former allocates a
different space according to the currently active tab, which is set by
the latter.
gtk_notebook_pages_allocate() already calls gtk_notebook_redraw_tabs()
when the allocation changes, so just move its call down to
gtk_notebook_real_switch_page() to fix the bug.
https://bugzilla.gnome.org/show_bug.cgi?id=662629
When we use the style context to get information for the tab region,
also add a style class to indicate its position, so that the relevant
information is pulled off from the theme.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
The setter for this was deprecated in 2.x and removed in 3.0.
I don't see any reason why we should hardcode 2px for this value;
instead, deprecated the getter and make it always return zero, and stop
using the variables internally.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
The code before was basically adding and removing the same padding value
in two different places during the allocation cycle.
Instead, what we want to do is to offset the inactive tab allocation by
the difference with the active tab padding, to ensure the tab content is
always drawn centered and in the right position.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
We want to enable the use of different padding values between active and
inactive tabs, so that the two are completely separated (but limited by
the active tab size).
This way themes can decide how bigger the active tab is drawn compared
to the normal one just specifying a different padding value from the
CSS, like this:
.notebook tab {
padding: 2;
}
.notebook tab:active {
padding: 4;
}
As a first step, fetch the padding values with the right state flags
from GtkStyleContext.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.
'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.
'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.
'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.
https://bugzilla.gnome.org/show_bug.cgi?id=649567
Include the child widget path in the returned path now. This allows
customizing the path of the current widgets - like adding flags to child
widgets (and maybe siblings in the future).
This code should be more obvious: The check only needs to check for
scrollable widgets, and only needs to compare to tab_width.
As a side note, for vis_pages == 1, tab_width will be smaller than
tab_max + stuff, so this code will not behave differently.
We don't want tabs to resize when a 2nd page is added, just because the
scroll arrows are now visible. And we do want the arrow size to be
included.
Note: Previosuly this code was never run, as the check
requisition->width < tab_width
was only run when tab_width wasn't computed, so was still equal to 0
(same for the height). So what this patch essentially does it add the
functionality of the if switch.