Benjamin Otte
d55628cd9f
testutils: Add deprecation guards
2015-11-09 01:48:14 +01:00
Matthias Clasen
c2a9202a66
Move gtk_builder_extend_with_template to public header
...
We export the symbol, so we should not hide it in private
headers.
2015-11-08 19:21:45 -05:00
Matthias Clasen
f0a74bc302
Document gtk_builder_extend_wth_template
2015-11-08 19:21:39 -05:00
Matthias Clasen
f5af2612f4
Adwaita: Update print dialog styling
...
Adapt to the changes in the previous commit. With the changes here,
we always render the paper as white, even in the dark theme.
2015-11-07 00:58:00 -05:00
Matthias Clasen
59c1547a48
print dialog: Use an element name for rendering the paper
...
Use a transient node with name paper instead of a random
collection of style classes for rendering the papers.
2015-11-07 00:57:03 -05:00
Matthias Clasen
c63c932a05
Adwaita: Update expander styling
...
Adapt to the changes in the previous commit.
2015-11-07 00:42:37 -05:00
Matthias Clasen
7ba1368c40
epxander: Port to CSS nodes
...
Use CSS nodes with name expander and arrow here.
2015-11-07 00:42:24 -05:00
Matthias Clasen
cf7f23f4dd
scrolledwindow: Document overlay scrolling style classes
...
Document which style classes are used on scrollbars to
implement overlay scrolling.
2015-11-06 23:35:20 -05:00
Matthias Clasen
353bfb0092
scrolledwindow: Set positional classes on scrollbars
...
This might be useful for some themes.
2015-11-06 23:28:22 -05:00
Matthias Clasen
f900bec4fa
scrolled window: Drop unnecessary transient nodes
...
We already add the .frame style class to the context depending
on the shadow property. No need to save the context and add it
again all the time.
2015-11-06 22:58:08 -05:00
Matthias Clasen
e1182ec0e1
window: Don't pass wrong state to context
...
GtkStyleContext warns nowadays if one queries properties
from a different state. So, don't do that.
2015-11-06 22:47:16 -05:00
Matthias Clasen
d25e0657be
range: Fixes to the new trough rendering
...
There was an errant y that caused some troughs to not be drawn.
And also set the state of the fill node.
2015-11-06 22:27:31 -05:00
Matthias Clasen
60c7893c14
scale: Document the new CSS nodes
2015-11-06 22:27:31 -05:00
Benjamin Otte
e5ef7dc681
notebook: Fix copy/paste error
...
This is from the recent commit 2a1a483ede
2015-11-07 03:29:44 +01:00
Matthias Clasen
f95a22a3ab
Adwaita: Update range styling
...
Adapt to the new CSS nodes for trough rendering. This commit
also brings back visible fill-level rendering for scales, which
was not working for a while. The styling provided for that
(scale trough fill) is just a placeholder to aid in debugging
the implementation.
2015-11-06 19:28:56 -05:00
Matthias Clasen
11d7f6df7c
range: Use CSS nodes for all trough rendering
...
This replaces the somewhat freewheeling use of style classes to
render a part of the trough highlighted and show a fill level.
2015-11-06 19:25:58 -05:00
Matthias Clasen
50ff2a566a
Update mac key theme for css changes
...
Use the element names for widgets.
2015-11-06 15:20:35 -05:00
Matthias Clasen
bc656a3ca5
Update emacs key theme for css changes
...
Use the element names for widgets.
2015-11-06 15:20:35 -05:00
Benjamin Otte
a9814fea7d
stylecontext: Always warn on style mismatch
...
For now, always warn when
gtk_style_context_get()/get_padding()/get_margin()/get_border()
get called with the wrong state.
We used to hide this behind an env var because the warnings were
too frequent, but with the recent refactorings, this warning has become
rather important for detecting bugs.
If it's still problematic, we might want to revert this patch before
3.20.
2015-11-06 18:59:15 +01:00
Benjamin Otte
68ed166c60
range: Use right state when querying margin
2015-11-06 18:59:15 +01:00
Benjamin Otte
2a1a483ede
notebook: Query the right node's padding
2015-11-06 18:59:15 +01:00
Benjamin Otte
37b4b60e91
spinbutton: Use right state when querying padding
2015-11-06 18:59:15 +01:00
Matthias Clasen
38cd2c1239
range: Update trough state
...
It might make sense for the theme to render an insensitive trough
differently.
2015-11-06 11:53:42 -05:00
Matthias Clasen
0bfc7db1fa
popover: Don't create transient CSS nodes
...
There is no need to save the style context here.
2015-11-06 11:50:23 -05:00
Matthias Clasen
8d886f3513
Cosmetic: Use defines for style classes
2015-11-06 11:50:23 -05:00
Matthias Clasen
76fbcc2f26
range: Document fine-tuning style class use
2015-11-06 11:50:23 -05:00
Benjamin Otte
203d8daff4
acccellabel: Use right state when querying font
...
This was causing permanent invalidations otherwise because drawing
causes the state of the accel node to change.
2015-11-06 16:37:40 +01:00
Matthias Clasen
ffd517cc3f
Adwaita: Update scale styling
...
Use :first-child/:last-child on the trough for determining
which slider we need.
2015-11-06 07:04:14 -05:00
Matthias Clasen
bfee2d3c61
scale: Stop using style classes for marks
...
We can use :first/last-child for this now.
2015-11-06 07:01:42 -05:00
Matthias Clasen
fd5729baef
Adwaita: Fix up filechooser styling
...
Several details of sidebar and places view styling were lost
along the way. Bring back the circular buttons.
2015-11-05 23:44:16 -05:00
Matthias Clasen
527df17ea3
places view: Remvoe some unused style classes
...
These style classes were not used in Adwaita, and didn't make
any difference for the appearance.
2015-11-05 23:44:16 -05:00
Matthias Clasen
efc7dfd7a7
places view: Add an element name
...
Use placesview as the element name.
2015-11-05 23:41:42 -05:00
Matthias Clasen
6be2073740
Adwaita: Redo combo box entry styling
...
Instead of relying on .linked or + (which doesn't work right in rtl),
use :not(:only-child) to select a button that is not alone inside a
combobox.
2015-11-05 21:59:56 -05:00
Matthias Clasen
f1b7005ede
combobox: Don't add .linked
...
It interferes with getting the desired styling for combo boxes
with an entry, and is not needed.
2015-11-05 21:59:56 -05:00
Matthias Clasen
7cd177e0d7
Fix a typo
2015-11-05 21:59:56 -05:00
Matthias Clasen
ad214e1871
window: Add a diagram to the CSS documentation
2015-11-05 16:13:06 -05:00
Matthias Clasen
5d62c808b1
Adwaita: Update window styling
...
We no longer inherit the style classes on the decoration subnodes,
so we have to adjust some selectors.
2015-11-05 16:07:29 -05:00
Matthias Clasen
b4c650ae85
window: Use permanent CSS nodes
...
gtk_style_context_save_named() has drawbacks that we want to avoid.
2015-11-05 16:06:49 -05:00
Matthias Clasen
948e077f1c
tool button: Add element names for tool item subclasses
...
Add the obvious names to the CSS nodes of GtkRadioToolButton,
GtkToggleToolButton and GtkSeparatorToolItem.
2015-11-05 15:41:37 -05:00
Matthias Clasen
ec60bd889c
flowbox: Add element names
...
The names used here are flowbox and flowboxchild.
2015-11-05 15:23:44 -05:00
Matthias Clasen
527f4f44c1
Adwaita: Update listbox styling
...
Adapt to the changes in the previous commit.
2015-11-05 13:53:43 -05:00
Matthias Clasen
94e675257a
placessidebar: Use the same element name for rows
...
Use row as the element name here too.
2015-11-05 13:51:58 -05:00
Matthias Clasen
4f29b4a348
listbox: Add element names
...
The names used here are list and row.
2015-11-05 13:48:02 -05:00
Matthias Clasen
92a5eccc3d
aspect frame: Use an element name
2015-11-05 12:56:16 -05:00
Matthias Clasen
cd798d5aed
places sidebar: Document style classes
...
Document the style classes that GtkPlacesSidebar uses on its rows.
2015-11-05 12:56:16 -05:00
Alexander Larsson
b3d02671ca
GtkFileChooserButton: Use native dialogs
...
Unless you explicitly set the dialog constructor property we use a
native dialog (GtkFileChooserNative).
2015-11-05 16:54:12 +01:00
Alexander Larsson
5094900180
GtkFileChooserNative: Fallback and win32 implementation
...
This is a subclass on GtkNativeDialog that uses GtkFileChooserDialog
as a fallback, but also has support for the win32 file chooser dialog.
2015-11-05 16:54:07 +01:00
Alexander Larsson
693db082a1
GtkFileFilter: Add private function to represent filter as pattern
...
This will be needed for the win32 native file chooser which
does not support mimetype sniffing.
2015-11-05 16:52:52 +01:00
Alexander Larsson
81cef0091e
Add GtkNativeDialog abstract base class
...
This is a base class that essentially mirrors GtkDialog, but
it is not a GtkWindow, as the actual implemetation will be using
native code.
The base class has show and hide vfuncs, as well as a helper function
to run the dialog in a modal fashion.
This will be later used by the native file chooser dialog.
2015-11-05 16:52:52 +01:00
Alexander Larsson
0f6c7682b3
Make GtkFileChooser interface require a GObject
...
Before all GtkFileChooser implementations had to be a GtkWidget,
but we want to introduce one for native implementations that
is not a widget.
This is technically an ABI break, because some code could rely
on the guarantee that GtkFileChoosers are GtkWidgets and do
unchecked GtkWidget calls. However, that does seem unlikely,
and this has not really been documented anywhere.
2015-11-05 16:52:52 +01:00
Alexander Larsson
1c46a02bcb
TreeModelFilter: Fix uninitialized memory read.
...
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
2015-11-05 16:52:51 +01:00
Matthias Clasen
199e35fa5c
HighContrast: Update places sidebar styling
...
Use the new element name.
2015-11-05 10:43:02 -05:00
Matthias Clasen
35eaca27e4
Adwaita: Update places sidebar styling
...
Use the new element name.
2015-11-05 10:43:02 -05:00
Matthias Clasen
de3ad3781c
placessidebar: Use an element name
...
Set the element name placessidebar.
2015-11-05 10:43:02 -05:00
Matthias Clasen
f327ef3cf1
scrolledwindow: Use permanent CSS nodes
...
This avoids false inheritance due to gtk_style_context_save_named(),
and is generally the right thing to do.
2015-11-05 10:32:04 -05:00
Matthias Clasen
4ed47e757f
Fix a crash with steppers
...
The introduction of the trough node was not properly carried
into the code constructing stepper nodes, and was causing
assertion failures there. This was only showing up on Windows,
since Adwaita and HighContrast don't have steppers.
2015-11-05 09:44:14 -05:00
Matthias Clasen
4247e42411
stack sidebar: Remove an unused variable
2015-11-05 09:44:14 -05:00
Benjamin Otte
820a8c2c7f
checkmenuitem: Update CSS nodes on set_active()
...
The function only doesn't notify(). It is supposed to handle CSS
changes.
2015-11-05 15:23:12 +01:00
Benjamin Otte
c7491fa144
stack: Store actual widget size, not preferred size
...
This is just a cleanup commit, no actual bug.
2015-11-05 15:23:12 +01:00
Carlos Garnacho
4d524ab469
widget: Avoid critical warnings when disconnecting plain GtkEventControllers
...
This signal is only set on GtkGesture objects, so check it's really there
before disconnecting.
2015-11-05 14:32:37 +01:00
Matthias Clasen
66d2c9e6fa
Adwaita: Update stack sidebar styling
...
We no longer use the .sidebar-item style class.
2015-11-05 08:18:38 -05:00
Matthias Clasen
87deb25dc3
stack sidebar: Drop the .sidebar-item style class
...
It is not needed to achieve the desired theming.
2015-11-05 08:18:06 -05:00
Matthias Clasen
c59ef7bf2f
stack switcher: Clarify CSS documentation
2015-11-05 08:17:49 -05:00
Matthias Clasen
37c923ad8a
HighContrast: Update filechooser styling
...
Update for changes in previous commit.
2015-11-05 07:45:39 -05:00
Matthias Clasen
87c6ae1c18
Adwaita: Update searchbar styling
...
Adapt to the changes in the previous commit.
2015-11-05 07:44:29 -05:00
Matthias Clasen
bec58dc39e
searchbar: Stop adding a style class
...
We have an element name now.
2015-11-05 07:44:04 -05:00
Matthias Clasen
a71bc24184
file chooser: Don't use .search-bar for a box
...
Just use the more general .view class to avoid special-casing
the file chooser in the theme.
2015-11-05 07:40:48 -05:00
Matthias Clasen
2e314940af
range: Redraw when slider visiblity changes
...
We were not queuing a draw (and not updating the CSS node) when
the slider visibility changed. This was exposed by the Trough
button in tests/testscale.
Fix this by taking slider visibility into account when deciding
whether to queue a draw in response to adjustment changes.
2015-11-05 07:26:10 -05:00
Matthias Clasen
8afb4a69e8
HighContrast: Update scale styling
2015-11-05 07:26:10 -05:00
Matthias Clasen
53ae100e64
Adwaita: Update scale styling
...
Adapt to the introduction of trough nodes.
2015-11-05 07:26:10 -05:00
Matthias Clasen
07841f269d
scale: Split marks node into two
...
Use separate CSS nodes for the marks above and below the trough.
2015-11-05 07:26:10 -05:00
Matthias Clasen
973836d395
range: Add private api to get the trough node
...
This will be needed in range subclasses to position their
own subnodes.
2015-11-05 07:26:10 -05:00
Matthias Clasen
9f3deaa496
HighContrast: Update range styling
...
Adjust to the changes in the previous commit.
2015-11-05 07:26:10 -05:00
Matthias Clasen
1261aa6fdf
Adwaita: Update range styling
...
Adjust to the changes in the previous commit. This partially
undoes the earlier range changes.
2015-11-05 07:26:10 -05:00
Matthias Clasen
2bfb5ad812
range: Add a CSS node for the trough
...
This is in sync with what we do elsewhere for troughs.
2015-11-05 07:26:10 -05:00
Benjamin Otte
b6b00c31d7
stack: Queue a resize/allocate when switching children
...
We only allocate a size to the currently visible child, so we obviously
need to rerun allocation when the visible child changes.
In the case where the stack is not homogenous, we also need to queue a
resize because our size request just changed.
2015-11-04 19:39:29 +01:00
Matthias Clasen
894bd13240
HighContrast: Update progressbar styling
...
Adjust to the chagnes in the previous commit. This partially
undoes the earlier progressbar changes.
2015-11-04 12:43:06 -05:00
Matthias Clasen
48e605b7a4
Adwaita: Update progressbar styling
...
Adjust to the changes in the previous commit. This partially
undoes the earlier progressbar changes.
2015-11-04 12:33:06 -05:00
Matthias Clasen
9d4c78c2d0
progressbar: Add a CSS node for trough
...
This is better, since the trough doesn't fill up the allocation
entirely.
2015-11-04 12:32:15 -05:00
Matthias Clasen
eade244cac
popover: Add the .background style class
...
This style class indicates that something _requires_ a background,
which is clearly the case for popovers.
2015-11-04 12:05:03 -05:00
Matthias Clasen
cca5cac965
paned: Move .wide to CSS subnode
...
This fits better with our general use of style classes.
2015-11-04 12:05:03 -05:00
Matthias Clasen
d40576fb3e
revealer: Use an element name
2015-11-04 12:05:03 -05:00
Krzesimir Nowak
4fe04ab54a
scrolledwindow: Fix a typo
2015-11-04 14:19:13 +01:00
Matthias Clasen
399ab49fbb
HighContrast: Update scrolled window styling
...
Adapt to the changes in the previous commit.
2015-11-04 07:38:15 -05:00
Matthias Clasen
2ef86c94ed
Adwaita: Update scrolledwindow styling
...
Adapt to the changes in the previous commit.
2015-11-04 07:38:15 -05:00
Matthias Clasen
80af6ff130
scrolledwindow: Port to CSS nodes
...
Change GtkScrolledWindow to use transient named CSS nodes for
drawing the overshoot, undershoot and scrollbar junction.
2015-11-04 07:38:15 -05:00
Emmanuele Bassi
c1ecd1ef9d
docs: Point at for_scale() variants
...
Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
scaling factor is almost certainly going to get worse results than using
their for_scale() variants.
2015-11-04 11:50:37 +00:00
Emmanuele Bassi
f959b35064
docs: Clarify gtk_render_icon()'s behaviour
...
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.
You should be using gtk_render_icon_surface() anyway.
2015-11-04 11:45:41 +00:00
Matthias Clasen
b9613cc416
inspector: Some improvements to the CSS node tree
...
Set a min-content-height for the property list, and
allow horizontal scrolling.
2015-11-04 00:00:56 -05:00
Matthias Clasen
d077f627ef
inspector: Really show the selected CSS node
...
Try harder to scroll the selected CSS node into view.
2015-11-03 23:55:50 -05:00
Matthias Clasen
0024358c91
scale: Fix a crash
...
We can only free the marks_node if there is one.
2015-11-03 23:35:32 -05:00
Matthias Clasen
099cde5f80
stack sidebar: Use an element name
2015-11-03 23:27:34 -05:00
Matthias Clasen
ead35ee12f
stack switcher: Use an element name
2015-11-03 23:24:49 -05:00
Matthias Clasen
910f4f72ba
stack: Set an element name
...
And it is...stack.
2015-11-03 23:20:24 -05:00
Matthias Clasen
8dfb0e728c
HighContrast: Update range styling
...
Adapt to changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen
37ad3628a0
Adwaita: Update range styling
...
Adapt to the changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen
8727c8fe24
range: Convert to CSS nodes
...
Use CSS nodes for GtkScale and GtkScrollbar. See their documentation
for details on what subnodes with what names exist.
2015-11-03 23:17:09 -05:00
Benjamin Otte
2a6e1498ba
testutils: Deprecate a bunch of ugly functions
...
We've by now disabled and then remved all of the tests that use these
functions because they never worked properly. So let's depecate these
functions before somebody starts using them.
2015-11-04 05:06:31 +01:00
Christian Hergert
24391634b5
stack: GtkStack:interpolate-size should be read/write
...
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.
There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-03 15:13:51 -08:00
Christian Hergert
5f0a8cf136
headerbar: remove G_PARAM_CONSTRUCT from custom-title
...
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.
https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-03 14:50:56 -08:00
Benjamin Otte
d65ba7cf97
widget: Queue resize on parent, not self
...
When setting the parent of a widget, queue_resize() on the widget will
be optimized away if the widget already had a resize queued.
Plus, we do not need to resize the widget as its size request is not
going to change.
2015-11-03 22:55:03 +01:00
Matthias Clasen
8e5c7ac028
menu: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
c389511b86
paned: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
92e3655ace
combo box: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
a7076d1c4c
text view: Add diagram to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
fc0a222350
accel label: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
332ea5f8ec
progressbar: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
65d959bbc8
spin button: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
870461475a
switch: Add a diagram to CSS node documentation
2015-11-03 14:27:35 -05:00
Benjamin Otte
1f01b8d52a
widget: Queue an allocate on hide
...
This makes sure that hidden widgets always have priv->alloc_needed set
on them.
The constructor sets that flag, so we want to have it back when we
revert to this state.
This fixes GtkWindow skipping a size_allocate() when reshowing a
previously hidden window and thereby not updating its allocation and
clip. And that in turn would lead to draws not happening and us beig
left with a black window.
2015-11-03 18:57:14 +01:00
Matthias Clasen
09f7c8511b
model button: Add diagrams to the CSS node documentation
2015-11-03 12:51:52 -05:00
Matthias Clasen
19b34a44b2
model button: Complete the CSS node conversion
...
There was still style context saving in the draw function,
and the CSS node was not always properly updated and positioned.
Fix these things, and use the same CSS node for the arrow
drawing as well.
2015-11-03 12:20:53 -05:00
Matthias Clasen
6791c1413d
list box: Remove an unused static
2015-11-03 10:43:48 -05:00
Matthias Clasen
77e99039fc
file chooser button: Remove an unused variable
2015-11-03 10:41:49 -05:00
Matthias Clasen
67b739b58a
button: Add diagrams to CSS node docs for buttons
2015-11-03 10:17:41 -05:00
Matthias Clasen
6328cf5ee5
entry: Add a diagram to CSS node docs
2015-11-03 09:53:00 -05:00
Matthias Clasen
c711906f8c
inspector: Replace a use of gtk_button_set_focus_on_click
...
It is deprecated now.
2015-11-03 07:44:17 -05:00
Florian Müllner
de50012371
listbox: Implement :focus-on-click
...
Similar to buttons-in-toolbars, it can make sense for listbox rows
to not take away the focus from the main application view, for
instance when used for navigation. Support this by taking the newly
added GtkWidget:focus-on-click property into account.
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
e364ae3ea8
Use gtk_widget_set_focus_on_click() instead of deprecated setters
...
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
9a29a2768b
Deprecate widget-specific :focus-on-click properties
...
The differences between the existing properties and the newly added
GtkWidget:focus-on-click property are minimal (different owner_type
in GParamSpec), so it is extremely unlikely that dropping the former
would break anything.
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
ebdf5f581d
widget: Add :focus-on-click property
...
There are currently three widget that implement such a property, and
there are other widgets for which the behavior can make sense. It
seems like a good time to add the property to GtkWidget itself so
subclasses can choose to respect it without adding their own property.
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Carlos Garnacho
4f61fd09c5
texthandle: Request raising of text handle popovers.
...
https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho
9d1b8dfc61
popover: Request raise on ::show
...
This way latest shown popovers are ensured to be on top.
https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho
fa3e0be80c
GtkWindow: make popover stacking explicit
...
The list of popovers will specify the stacking order, a
_gtk_window_raise_popover() private call has been added so popover
widgets can request being on top.
Also, the stacking on popovers is ensured on gtk_window_size_allocate(),
after the size/stacking changes on the child widget have finished, this
will ensure popovers are kept on top of window contents.
https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:14:36 -05:00
Olivier Fourdan
a5b1cdd0c1
GtkWindow: Fix the shadow width logic
...
Previous commit 305b34a
"GtkWindow: fix move/get position with CSD"
introduced a regression because some windows presumably use shadows but
actually don't, resulting in a negative offset being wrongly applied.
Problem is that get_shadow_width() would return non-zero shadows even
for windows that have no shadow, thus causing the negative offset.
Fix the logic in get_shadow_width() and gtk_window_should_use_csd() so
that get_shadow_width() returns accurate values.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-03 09:33:34 +01:00
Matthias Clasen
9f04efd316
Adwaita: Update menubar styling
...
Adapt to the changes in the previous commit.
2015-11-02 23:49:38 -05:00
Matthias Clasen
a0d7b609e3
menubar: Use an element name
2015-11-02 23:49:20 -05:00
Matthias Clasen
b6112c6ed6
Adwaita: Update menu item styling
...
Adapt to the changes in the previous commit.
2015-11-02 23:43:58 -05:00
Matthias Clasen
aede5c65d3
menu item: Use CSS nodes
...
Use the element name menuitem for GtkMenuItem, GtkCheckMenuItem
and GtkRadioMenuItem. GtkSeparatorMenuItem gets the name separator.
Add a subnode with name arrow if a submenu is attached.
Give the radio and check menu items a subnode with name check or
radio.
2015-11-02 23:42:14 -05:00
Matthias Clasen
ac553d7e44
check button: Match documented behavior
...
We were not actually adding the style classes that the
documentation is talking about, for the !draw-indicator case.
Fix that.
2015-11-02 23:06:57 -05:00
Matthias Clasen
dd01f2d407
menu item: Remove an unused member
...
Nobody is reading or writing this field, so we can do without it.
2015-11-02 22:20:04 -05:00
Matthias Clasen
2ba957364d
menu: Fix up CSS node ordering
...
Keep the bottom arrow node at the end, where it belongs.
2015-11-02 21:49:10 -05:00
Matthias Clasen
25e01a3937
menu: Document CSS nodes
2015-11-02 21:40:40 -05:00
Matthias Clasen
0e41ff015c
HighContrast: Update menu styling
...
Support the element names introduced in the previous commit.
2015-11-02 21:34:14 -05:00
Matthias Clasen
f8c3e48bd2
Adwaita: Update menu styling
...
Support the element names introduced in the previous commit.
2015-11-02 20:47:56 -05:00
Matthias Clasen
0b52b29dfc
menu: Port to use css nodes
...
Use the element name menu for the main node, and use two subnodes
with name arrow and style classes .top and .bottom for the arrows
of scrolling menus.
2015-11-02 20:47:55 -05:00
Cosimo Cecchi
f6ca908e03
menushell: don't call gtk_render_background()
...
GtkMenu and GtkMenuBar, the two implementations of GtkMenuShell in GTK,
already draw it.
Furthermore, rendering a background here will overdraw any rendering
that the subclass will do, such as arrows for scrolling menus.
2015-11-02 16:05:07 -08:00
Benjamin Otte
7cdfee71da
inspector: Do not show transient nodes
...
This is kind of a hack the way it's implemented, but it's necessary
for performance to ignore transient nodes as they get created all the
time (via gtk_style_context_save()) and invalidate the whole treeview.
And that causes resizes and redrawing of the treeview and performance of
the inspector would go down the drain now that we display a larger part
of the node tree.
2015-11-02 20:32:12 +01:00
Benjamin Otte
81de33e906
inspector: Always show full CSS node tree
...
Just select the node of the current widget whenever a new one gets
selected.
2015-11-02 20:32:12 +01:00
Matthias Clasen
5ebb713df5
HighContrast: Update combobox styling
...
Adapt to the changes in the previous commit.
2015-11-02 14:26:50 -05:00
Matthias Clasen
0d12cc3354
Adwaita: Update combobox styling
...
Adapt to the changes in the previous commit. Some further fixes will
be necessary here.
2015-11-02 14:22:49 -05:00
Matthias Clasen
d229ea3de1
combobox: Use element names
...
Use combobox as the element name for the main CSS nodes of
GtkComboBox and GtkComboBoxText. Add the .combo style class
to the button and entry. in a GtkComboBox or GtkComboBoxText.
2015-11-02 13:56:25 -05:00
Matthias Clasen
e56bb49407
popover: Document differentiating style classes
...
There's a lot of popover variations out there.
2015-11-02 12:53:57 -05:00
Matthias Clasen
13d091f700
button: Mention differentiating style classes
...
There's a lot of button variations out there, lets document
the ones we know about.
2015-11-02 12:51:00 -05:00
Matthias Clasen
113c88c2cf
HighContrast: Update magnifier styling
...
Adapt to changes in the previous commit.
2015-11-02 12:47:14 -05:00
Matthias Clasen
85bfe9ee38
Adwaita: Update magnifier styling
...
Adapt to changes in the previous commit.
2015-11-02 12:46:45 -05:00
Matthias Clasen
d5ff9af94e
entry, textview: Use a dedicated style class for magnifier
...
This will free up "osd" as an application-level style class,
and lets us style magnifiers differently.
2015-11-02 12:40:38 -05:00
Matthias Clasen
f2434e7cea
file chooser button: Add a style class
...
Unfortunately, GtkFileChooserButton is different from the other
pickers in that it is not a button, but rather has a button.
We ignore the difference for styling purposes, and just add
a .file style class to the button.
2015-11-02 12:27:36 -05:00
Matthias Clasen
957135a57c
Adwaita: Fix menu separators
...
These were inadvertedly broken by the element name conversion
for regular separators.
2015-11-02 12:21:39 -05:00
Benjamin Otte
5c53e873b1
inspector: Track updates of node styles
...
When the CSS style of a node changes, we want to display the new values
in the inspector.
This for example allows to see how styles update on hover or during
animations.
2015-11-01 16:45:11 +01:00
Colomban Wendling
f4c30060be
cssnode: Fix style updating when the CSS node ID changes
...
Since 4ebb5781ea
ID has a specific value,
while it used to be the same as NAME. Thus, explicitly list ID as a
radical change just like NAME.
https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-01 02:42:36 +01:00
Colomban Wendling
79a3a7800e
cssnode: Fix a typo leading to very poor cache hashing
2015-11-01 02:42:36 +01:00
Colomban Wendling
eef5f27fb4
gtkcontainer: Guard internal use of deprecated public API
2015-11-01 02:42:36 +01:00
Benjamin Otte
e0f4bf5d35
inspector: Store the current node in the priv struct
2015-11-01 02:42:36 +01:00
Benjamin Otte
b89939f5a4
inspector: Split out a function
2015-11-01 02:42:36 +01:00
Matthias Clasen
7568d17a15
toolpalette: Use element names
...
Give the GtkToolPalette and GtkToolItemGroup the element
names toolpalette and toolitemgroup.
2015-10-31 21:02:36 -04:00
Matthias Clasen
cacc63ea4b
HighContrast: Update toolbutton styling
2015-10-31 20:55:51 -04:00
Matthias Clasen
1bc2913f52
Adwaita: Update tool button styling
2015-10-31 20:52:41 -04:00
Matthias Clasen
4323dd34f3
tool button: Add an element name
...
Unsurprisingly, it is toolbutton.
2015-10-31 20:52:09 -04:00
Matthias Clasen
dba8eba6db
HighContrast: Update toolbar styling
...
Adapt to the changes in the previous commit.
2015-10-31 20:43:07 -04:00
Matthias Clasen
5ffd54aca8
Adwaita: Update toolbar styling
...
Adapt to the changes in the previous commit.
2015-10-31 20:42:41 -04:00
Matthias Clasen
7ee7019ca7
toolbar: Use an element name instead of a style class
...
The element name is ... toolbar.
2015-10-31 20:30:56 -04:00
Matthias Clasen
479d64e89a
progress bar: Add CSS documentation
2015-10-31 20:30:15 -04:00
Matthias Clasen
ca385af3c4
HighContrast: Update progressbar styling
...
Adapt to the changes in the previous commit.
2015-10-31 20:24:46 -04:00
Matthias Clasen
71afd762ed
Adwaita: Update progressbar styling
...
Adapt to the changes in the previous commit.
2015-10-31 20:24:19 -04:00
Matthias Clasen
73704d98cc
progressbar: Convert to CSS nodes
...
Use the element names progressbar and progress.
2015-10-31 20:20:13 -04:00
Matthias Clasen
bab20f1d10
trivial formatting fix
2015-10-31 19:23:47 -04:00
Matthias Clasen
7ea33d82ed
Remove a duplicate include
2015-10-31 19:19:53 -04:00
Matthias Clasen
d3abd83330
Adwaita: Fix up color button styling
...
There was one forgotten instance of the GtkColorSwatch type name.
2015-10-31 19:13:32 -04:00
Matthias Clasen
7465601c1e
HighContrast: Update the frame styling
...
Adapt to the changes in the previous commit.
2015-10-31 19:11:18 -04:00
Matthias Clasen
3de78decd4
Adwaita: Update frame styling
...
Adapt to the changes in the previous commit.
2015-10-31 19:10:52 -04:00
Matthias Clasen
aa5dc38b0d
frame: Use an element name instead of a style class
...
Unsurprisingly, the element name is ... frame.
2015-10-31 19:09:46 -04:00
Matthias Clasen
1f585151fd
Load settings.ini from all data dirs
...
An error in the loading function was making us load the file from
the first data dir repeatedly, instead.
https://bugzilla.gnome.org/show_bug.cgi?id=757377
2015-10-31 18:16:10 -04:00
Matthias Clasen
e2e198aae4
model button: Propagate state
...
Propagate the state to the CSS node for the indicator.
2015-10-31 00:08:00 -04:00
Matthias Clasen
b6fda5dc0a
inspector: Show CSS node state
...
This is useful when debugging state propagation issues between
CSS nodes.
2015-10-31 00:07:19 -04:00
Matthias Clasen
c265b58181
HighContrast: adjust message dialog styling
2015-10-30 23:49:44 -04:00
Matthias Clasen
d70d5ea6ec
adwaita: Adjust message dialog styling
2015-10-30 23:49:17 -04:00
Matthias Clasen
4fe1b9589e
message dialog: Use an element name
2015-10-30 23:48:46 -04:00
Matthias Clasen
dfedda3dee
color editor: Redo the non-activatable color swatch
...
Use a .activatable style class on the color swatch and tie the
hover effect to it. The color editor simply removes this class
now to get an inert color swatch.
This is more flexible and lets us avoid referring to the
GtkColorEditor type in the theme.
2015-10-30 22:19:07 -04:00
Matthias Clasen
42a231a61c
HighContrast: Adapt to color swatch changes
...
This needs more work and simplification.
2015-10-30 21:46:36 -04:00
Matthias Clasen
4e8aea012e
Adwaita: Adapt to color swatch changes
...
This needs more work and simplification.
2015-10-30 21:44:19 -04:00
Matthias Clasen
5ec9b330b3
swatch fixup
2015-10-30 21:43:50 -04:00
Matthias Clasen
e5d3c8dbae
color swatch: Convert to CSS nodes
...
Convert GtkColorSwatch to use the two elements colorswatch and
image.
2015-10-30 21:29:46 -04:00
Matthias Clasen
e3ef2c48d5
text view: Add css node docs
2015-10-30 21:00:01 -04:00
Matthias Clasen
a4a3736461
HighContrast: Update textview styling
...
Some updates to make text appear as usual.
2015-10-30 19:58:11 -04:00
Matthias Clasen
b39601bcc1
Adwaita: Update textview styling
...
Some updates to make text appear as usual. The border windows
probably need some more work.
2015-10-30 19:55:42 -04:00
Matthias Clasen
844f60f1f2
text view: Convert to CSS nodes
...
Use subnodes for the border windows, and add children to the right
subnodes.
2015-10-30 19:49:02 -04:00
Matthias Clasen
2b998aaad7
text view: Set an element name
...
And it will be...drumroll...textview.
2015-10-30 18:11:13 -04:00
Matthias Clasen
ee3799f151
icon view: Add an element name
...
Not surprising anybody, I decided to call it iconview.
2015-10-30 17:44:36 -04:00
Matthias Clasen
f97e2599e3
HighContrast: Adapt to changed treeview names
2015-10-30 17:38:04 -04:00
Matthias Clasen
739e0c17a1
Adwaita: Adapt to changed treeview names
2015-10-30 17:37:32 -04:00
Matthias Clasen
5b360a479d
tree view: Rename and document element names
...
The names are now treeview and header.
2015-10-30 17:25:43 -04:00
Matthias Clasen
a24dba28ae
HighContrast: Update font button styling
...
Use the new element name and style class.
2015-10-30 17:18:06 -04:00
Matthias Clasen
2cff7a68f2
Adwaita: Update font button styling
...
Use the new element name and style class.
2015-10-30 17:17:41 -04:00
Matthias Clasen
bd456ac67b
font button: Add an element name
...
Give this GtkButton subclass element name button and style class .font.
2015-10-30 17:09:59 -04:00
Matthias Clasen
85d971b40b
HighContrast: Update paned styling
...
Adapt to the new element names.
2015-10-30 15:53:28 -04:00
Matthias Clasen
828faaba64
Adwaita: Update paned styling
...
Adapt to the new element names in the previous commit.
This also adds back a selected state which gets used
for when the focus is placed on the separator with F8,
just so this functionality is not forgotten.
2015-10-30 15:53:28 -04:00
Matthias Clasen
0f2ce2bb1c
paned: Convert to CSS nodes
...
Add a subnode for the separator, and use it for drawing.
2015-10-30 15:53:28 -04:00
Matthias Clasen
97c1782246
Update the generated css for the previous commit
2015-10-30 14:51:41 -04:00
Timm Bäder
33ac663b13
popover: Use element name
...
Pick "popover" and add .menu for popover menus
2015-10-30 15:10:35 +01:00
Georges Basile Stavracas Neto
50c6a11b05
placesview: vertically align path labels
...
The current situation is somewhat sad, with the path
label totally misaligned throughout the rows.
This is fixed by using a size group for the path labels,
so they all have the same allocated size (with the max
of 15 chars). Also, instead of hiding the eject button,
set it child-invisible, so it is hidden and yet it's size
is allocated by GtkBox.
https://bugzilla.gnome.org/show_bug.cgi?id=757303
2015-10-30 11:35:43 -02:00
Lapo Calamandrei
84380b345d
Adwaita: fix vertical switch styling
2015-10-30 13:17:52 +01:00
Lapo Calamandrei
0a845fb563
Adwaita: fix switch sizing
...
moving -GtkSwitch-slider-width and -GtkSwitch-slider-height from
the GtkSwitch selector to the * wildcard selector as other style
props.
2015-10-30 12:53:44 +01:00
Matthias Clasen
af3789bb87
inspector: Drop the style property list
...
Style properties are now shown for each CSS node in the
CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Matthias Clasen
91af42263b
inspector: Drop the style classes list
...
Style classes can now be added/removed for each CSS node in
the CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Matthias Clasen
aa6e0ad3f2
menu button: Revisit style class one more time
...
Use .popup, which is already in use elsewhere, fits better with
the other button differentiating style classes, and does not
interfere with menus.
2015-10-30 06:16:10 -04:00
Matthias Clasen
c925a840b2
HighContrast: Update color button styling
...
Adapt to the previous commit.
2015-10-30 06:16:10 -04:00
Matthias Clasen
e148876dd4
Adwaita: Update color button styling
...
Adapt to the previous commit.
2015-10-30 06:16:10 -04:00
Matthias Clasen
7d18398eeb
color button: Add a style class
...
Add a .color style class to differentiate this button from the
normal ones.
2015-10-30 06:16:10 -04:00
Matthias Clasen
43e2ee31bc
HighContrast: Update headerbar styling
...
Adapt to the previous commit.
2015-10-30 01:09:18 -04:00
Matthias Clasen
40f9a0fe69
Adwaita: Update headerbar styling
...
Adapt to the previous commit.
2015-10-30 01:08:30 -04:00
Matthias Clasen
8c0c0f9c07
headerbar: Use an element name instead of a style class
...
Use the element name headerbar.
2015-10-30 01:07:58 -04:00
Matthias Clasen
b9c565b06c
Revisit menu button style
...
Change the style class to .menubutton, to avoid interference
from GtkMenu theming.
2015-10-30 01:07:27 -04:00
Matthias Clasen
ee81f3ee2f
menu button: Add a style class
...
Add a .menu style class to differentiate menu buttons from normal
ones.
2015-10-30 00:56:00 -04:00
Matthias Clasen
2c5e25a5c7
scale button: Add a style class
...
Add a .scale style class to differentiate scale buttons from normal
ones.
2015-10-30 00:51:13 -04:00
Matthias Clasen
4cd408e8d0
link button: Add a style class
...
Add a .link style class to differentiate link buttons from normal
buttons.
2015-10-30 00:50:48 -04:00
Matthias Clasen
9e5914ebde
HighContrast: Updates for recent changes
...
This is bit of a grab-bag, it includes fixes for spin buttons,
entries, buttons.
2015-10-30 00:40:50 -04:00
Matthias Clasen
d0e91ec088
Adwaita: Adapt to the button changes
...
The updates here cover the various button variants.
2015-10-30 00:40:50 -04:00
Matthias Clasen
8894e46183
model button: Convert to CSS nodes
...
Follow the same approach as used for the toggle button family:
Keep the button element name for button-like rendering, and
use a distinct modelbutton name otherwise, and add a subnode
for the indicator with name check or radio.
2015-10-30 00:40:50 -04:00
Matthias Clasen
c631656f0c
toggle button: Convert to css nodes
...
Convert GtkToggleButton and its subclasses to CSS nodes.
Keep the button element name for when we want to render
these button-like (but with .toggle, .check and .radio
style classes for differentiation).
When we want to render them with an indicator, use distinct
element names checkbutton and radiobutton, and add a subnode
for the indicator with name check or radio.
2015-10-30 00:40:50 -04:00
Matthias Clasen
826633b5b7
lockbutton: Revisit element name
...
Instead of a separate element name, keep button, and just
add a .lock style class, to inherit the button theming.
2015-10-30 00:26:04 -04:00
Matthias Clasen
cc2f189144
Adwaita: button fixes
2015-10-29 23:17:41 -04:00
Matthias Clasen
b350779a6f
togglebutton: Add a style class
...
This lets us differentiate toggle buttons from plain buttons
with button.toggle, without having to redo all the styling.
2015-10-29 23:04:47 -04:00
Matthias Clasen
a953e37735
button: Use an element name instead of a style class
2015-10-29 22:55:29 -04:00
Benjamin Otte
e39b8611bd
widget: Queue redraw on gtk_widget_queue_allocate()
...
Mirror the behavior of gtk_widget_queue_resize() and always queue a
redraw. If we ever want to cause allocates without redraws we can add
gtk_widget_queue_allocate_no_redraw() then.
I had initially assumed gtk_widget_size_allocate() would take care of
queueing redraws, but it does not do that when neither size nor position
change. And that is obviously what's happening after
gtk_widget_queue_allocate().
Fixes buttons sometimes not redrawing (the record button in
widget-factory after locking it, all buttons when switching to the dark
theme).
2015-10-30 02:09:17 +01:00
Matthias Clasen
32de7edf1d
Assistant: Fix page rmoval
...
We have to remove the page itself from the intermediate box
first, before removing the box from the notebook. Otherwise,
reffing the page to keep it alive is ineffective: the box
gets destroyed, and that destruction recurses over the page.
This fixes the problem in
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-10-29 19:21:47 -04:00
Sébastien Granjoux
ffaaa1e66e
Add a more complex widget in the flipping assistant
...
This reproduces the problem from bug
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-10-29 19:21:20 -04:00
Florian Müllner
a0a78a8973
Adwaita: Update double-border tweak for scrolled windows
...
Since commit b6dbfc791f
, GtkViewPort uses an element name.
2015-10-29 18:24:40 +01:00
Dominique Leuenberger
4f24c8569c
placessidebar: do not crash if uris is NULL
...
On Drag'n'Drop actions across system boundaries (VM host to guest), the
happen to be null.
https://bugzilla.gnome.org/show_bug.cgi?id=757298
2015-10-29 17:32:13 +01:00
Benjamin Otte
fc6f41c751
spinbutton: Don't set .entry
...
Also fix Adwaita to not use .entry anymore
2015-10-29 16:03:15 +01:00
Benjamin Otte
63f2fc752a
searchentry: Fix includes
2015-10-29 15:55:28 +01:00
Matthias Clasen
b6dbfc791f
viewport: Add an element name to the css node
...
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:47:31 -04:00
Matthias Clasen
ea5f16fd2d
searchbar: Add an element name to the css node
...
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:43:30 -04:00
Matthias Clasen
d634403d91
actionbar: Add an element name to the css node
...
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:08:15 -04:00
Matthias Clasen
2936d7bae8
statusbar: Add an element name to the css node
...
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:01:57 -04:00
Matthias Clasen
56d3e42a00
search entry: Add a style class
...
There should be little need to have separate styling for search
entries, so a separate name would be a bit overkill.
2015-10-28 23:58:39 -04:00
Matthias Clasen
a840a6d597
lock button: Add an element name
2015-10-28 23:57:57 -04:00
Matthias Clasen
bb7d7851ac
entry, spinbutton: Finish css node conversion
...
This commit creates entry and button subnodes for the buttons
in GtkSpinButton. The nodes are ordered like this for horizontal
spinbutton
+ entry
+ image.left
+ image.right
+ progress
+ button.down
+ button.up
and like this for vertical ones:
spinbutton
+ button.down
+ entry
+ button.up
This arrangement requires cooperation from GtkEntry to place
the entry subnodes correctly, and some small changes in the theme.
This commit also fixes progress rendering in vertical spin buttons.
2015-10-28 23:43:32 -04:00
Matthias Clasen
ebcad63e31
wip: spinbutton
2015-10-28 21:55:13 -04:00
Matthias Clasen
811c1c9484
spinbutton: Trivial cleanup
...
Use g_clear_object in a few places.
2015-10-28 21:55:13 -04:00
Benjamin Otte
4483636016
widget: Queue resize on parent on show/hide
...
When gtk_widget_show() or gtk_widget_hide() is called, don't queue a
resize on the widget itself but on the parent.
The widget itself may already be marked as in need of a resize and
the call would be optimized out and never reach the parent.
The parent size will change though because a child widget just changed
its visibility.
Fixes a bunch of issues with menus appearing black, toolbas not hiding
in widget-factory and also various reftests.
2015-10-29 01:03:09 +01:00
Benjamin Otte
cd20ae8fe1
container: Don't keep our own variable trying to track need for resize
...
Insteaad, introduce gtk_widget_needs_allocate() and use that.
2015-10-28 19:44:29 +01:00
Benjamin Otte
e07ff714b9
widget: Make invisible widgets not propagate resizes
...
Do not queue a resize on the parent if the widget is not visible.
Invisible widgets do not influence the parents size.
2015-10-28 19:44:29 +01:00
Benjamin Otte
bef44ab294
window: Don't queue resizes when inhibiting resizes
...
Since the frame clock, the inhibit happens on the GDK level, so this
code is no longer necessary.
2015-10-28 19:44:29 +01:00
Benjamin Otte
6866d1c06e
widget: Make gtk_widget_queue_allocate() not resize
...
This commit toggles the big switch. We now don't run size_allocate()
from the toplevel up anymore in cases where we don't need to.
Things might be broken in subtle ways as a result of this commit. We'll
have to find them and fix them.
2015-10-28 19:44:28 +01:00
Benjamin Otte
299600a7d4
widget: Track if a child needs an allocation
...
This is not used so far.
2015-10-28 19:44:28 +01:00
Benjamin Otte
f706891dd3
widget: Refactor function
...
Turn it from a loop into tail-calling itself.
2015-10-28 19:44:28 +01:00
Benjamin Otte
ab7e901cfd
widget: Move resize function into gtkwidget.c
...
There's no sizegroup specific code left in it, but lots of
widget-specifics.
2015-10-28 19:44:28 +01:00
Benjamin Otte
4fa74e68e9
sizegroup: Merge function into only caller
2015-10-28 19:44:28 +01:00
Benjamin Otte
b5dfe9b833
sizegroup: Simplify widget's size group invalidation
...
Since we do not queue resizes twice anymore, we can just walk the list
of groups without deduplication.
2015-10-28 19:44:28 +01:00
Benjamin Otte
a31123e9f0
sizegroup: Skip resizes on widgets that have resize queued
...
Widgets that already have a resize queued don't need to walk the whole
parent chain and queue another resize. It's enough to do it once per
resize.
This also means that sizegroups cannot use the shortcut of just
invalidating the first widget in the group anymore. That widget might
already have a resize queued while others don't.
2015-10-28 19:44:28 +01:00
Benjamin Otte
a4587ef4a0
widget: Warn on calls to queue_resize() during size_allocate()
...
This happens way too much, so it's disabled unless GTK_DEBUG=geometry is
on.
Also, we can't detect it in the call to queue_resize() yet, only during
size_allocate(), so the warning comes after the signal emission.
2015-10-28 19:44:28 +01:00
Benjamin Otte
4d631a9144
widget: Clear pending resizes after size_allocate()
...
This catches the cases where widgets call gtk_widget_queue_resize()
in their size_allocate() callback.
2015-10-28 19:44:28 +01:00
Benjamin Otte
3e3f17576e
widget: Warn if size-unqueried widgets get allocated
...
Widgets should have gtk_widget_get_preferred_width/height() called
on them before gtk_widget_size_allocate() gets called.
Add a check for this.
2015-10-28 19:44:28 +01:00
Benjamin Otte
6cc2615b63
widget: Add a resize_needed flag
...
... and API to set and unset it.
It is set when gtk_widget_queue_resize() is called.
It is unset when gtk_widget_get_preferred_width/height() is called.
So far it is not used.
2015-10-28 19:44:28 +01:00
Benjamin Otte
3ff894c201
widget: Add a function that does actual resize
...
It's just shuffling code around.
2015-10-28 19:44:28 +01:00
Benjamin Otte
58d506fb11
sizegroup: Merge function into only caller
...
Both functions were running the same loop. Just running the loop once
seems advantageous.
2015-10-28 19:44:28 +01:00
Benjamin Otte
85ab8ad001
sizegroup: Don't invalidate over resize containers.
...
Before this commit, a widget tree like this:
Window
AnyContainer (part of SizeGroup1)
GtkClutterEmbed
SomeWidget
when calling gtk_widget_queue_resize(SomeWidget), would invalidate
SizeGroup1, when it should have stopped at the GtkClutterEmbed (which is
a RESIZE_IMMEDIATE child).
2015-10-28 19:44:28 +01:00
Benjamin Otte
1f2e21ab9a
sizegroup: Refactor function
...
Get rid of continues in loop. This allows doing more complex things in
future commits.
2015-10-28 19:44:27 +01:00
Benjamin Otte
0721d964e4
sizegroup: Refactor function
2015-10-28 19:44:27 +01:00
Benjamin Otte
dd0e5cfce6
sizegroup: Remove special case before loop
...
The loop actually does the right thing already. There's no need to
complicate things.
2015-10-28 19:44:27 +01:00
Benjamin Otte
8fea3b02c9
sizegroup: refactor
...
The code looks a lot less dangerous if it doesn't look like we're
casting a random widget to a container.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e19818359a
sizegroup: Fold function into only caller
2015-10-28 19:44:27 +01:00
Benjamin Otte
690e015ed1
sizegroup: Move container function into its only caller
2015-10-28 19:44:27 +01:00
Benjamin Otte
0912a6c2f5
widget: Use gtk_widget_queue_allocate() when clip changes
...
There's no need to queue a full resize there.
2015-10-28 19:44:27 +01:00
Benjamin Otte
195397e87a
API: widget: Add gtk_widget_queue_allocate()
...
This is so widgets can queue a rerun of their allocation logic, but
without triggering resizes everywhere.
For now, it just calls gtk_widget_queue_resize().
2015-10-28 19:44:27 +01:00
Benjamin Otte
798a288405
container: Use correct allocation for calling size_allocate()
2015-10-28 19:44:27 +01:00
Benjamin Otte
d3d9f52365
API: widget: Add gtk_widget_get_allocated_size()
...
See docs for what this is.
2015-10-28 19:44:27 +01:00
Benjamin Otte
ab2d236d3d
sizegroup: Remove GtkQueueResizeFlags
...
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Benjamin Otte
5dd2087d19
widget: Remove _gtk_widget_override_size_request()
...
The function was only used by the geometry widget.
2015-10-28 19:44:27 +01:00
Benjamin Otte
08974a1e9a
window: Ignore geometry widget
...
Ignore the geometry widget passed to gtk_window_set_geometry_hints().
Usind the widget itself was a hack that complicates the size request
machinery.
It is also incorrect in that it doesn't respect height-for-width.
Last but not least, it was only used by gnome-terminal and that
application can easily work without it.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e422ccefe1
container: Don't randomly call gtk_widget_set_allocation()
...
gtk_widget_size_allocate() does that already.
2015-10-28 19:44:27 +01:00
Benjamin Otte
624fb8b360
entry: Always render like with is_cellrenderer
...
And remove the API to set that variable.
If you want the entry to not fill its whole allocated area,
gtk_widget_set_valign (entry, GTK_ALIGN_FILL);
will give you the old behavior.
2015-10-28 19:44:26 +01:00
Benjamin Otte
8ec2362d81
icontheme: Clarify GENERIC_FALLBACK flag handling
...
- Add docs explaining that it doesn't work everywhere
- g_warn_if_fail() in the APIs where it doesn't work
2015-10-28 19:44:26 +01:00
Benjamin Otte
5cffbed165
iconhelper: Don't pass GENERIC_FALLBACK flag
...
It's not used when looking up with a GIcon.
2015-10-28 19:44:26 +01:00
Benjamin Otte
a58d8bdcbc
cssprovider: Have a section when parsing style properties
...
Signal handlers expect a section to be present, so provide them with
one.
New testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-10-28 19:37:27 +01:00
Matthias Clasen
c4eb14eb01
Revert "tooltip: Use an element name"
...
This reverts commit efc8dc63e3
.
This change broke tooltip positioning in a way that I don't
fully understand, so take it back for now.
2015-10-28 11:53:36 -04:00
Matthias Clasen
854c7d1f0f
Revert "HighContrast: Update tooltip styling"
...
This reverts commit 93d80380ee
.
2015-10-28 11:53:33 -04:00
Matthias Clasen
cab40f0743
Revert "Adwaita: Update tooltip theming"
...
This reverts commit d974610741
.
2015-10-28 11:48:52 -04:00
Matthias Clasen
b4d49c36ce
Fix key themes for GtkEntry -> entry
...
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=757252
2015-10-28 10:19:00 -04:00
Matthias Clasen
20e46ce8ae
shortcuts: Redo the stack switcher theming
...
Use style classes on the button instead of the stack switcher,
this makes it easier to reuse elsewhere.
2015-10-28 10:19:00 -04:00
Matthias Clasen
62ec4a2415
shortcuts label: Redo the keycap theming
...
Use a style class directly on the frame. This is easier to reuse.
2015-10-28 10:19:00 -04:00
Matthias Clasen
4e950da4d1
Adwaita: Update shortcuts window theming
...
Use the newly added element name.
2015-10-28 10:19:00 -04:00
Matthias Clasen
0dffc8c9d3
shortcuts: Use predefined style classes
...
Lets use the defines we have.
2015-10-28 07:10:55 -04:00
Matthias Clasen
b3619f9050
HighContrast: Update calendar theming
...
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:37 -04:00
Matthias Clasen
085edf0212
Adwaita: Update calendar theming
...
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:25 -04:00
Matthias Clasen
2c2fd5c8c5
calendar: Add an element name
...
This will allow us to drop hardcoded type names in the theme.
2015-10-28 06:35:33 -04:00
Matthias Clasen
37eb5c08a4
inspector: Cosmetic changes to the hierarchy tab
...
Put the interfaces below GInterface.
2015-10-28 00:41:13 -04:00
Matthias Clasen
3869bdbc2b
inspector: Add css node style properties
...
Add a per-cssnode view of style properties.
2015-10-28 00:33:14 -04:00
Matthias Clasen
0d8444d067
Drop some no-longer existing headers
2015-10-27 20:29:43 -04:00
Matthias Clasen
93d80380ee
HighContrast: Update tooltip styling
...
Use the newly added element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen
d974610741
Adwaita: Update tooltip theming
...
Use the newly introduced element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen
efc8dc63e3
tooltip: Use an element name
...
This will allow us to drop hardcoded type names in the theme.
2015-10-27 20:06:24 -04:00
Benjamin Otte
e3ddbc544c
cssselector: Print name and any selector first
...
When printing a "compound selector", make sure the name and universal
selectors are printed at the beginning and class, id, etc. selectors are
printed last.
2015-10-27 20:12:38 +01:00
Matthias Clasen
9848fe006e
Adwaita: Update GtkAssistant theming
...
Use the new element name, instead of hardcoding the type.
2015-10-27 14:37:58 -04:00
Matthias Clasen
5b0208f890
assistant: Use an element name
...
This will allow us to drop hardcoded type names in the theme.
2015-10-27 14:37:58 -04:00
Matthias Clasen
0f4663728e
toolitemgroup: Fix the previous change
...
dispose can be called more than once.
2015-10-27 12:54:19 -04:00
Matthias Clasen
9753bea6a4
tool item group: Don't leak a button
...
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
2015-10-27 11:09:00 -04:00
Matthias Clasen
270e900f55
icon theme: Ensure to propagate an error
...
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.
Avoid this by propagating the load error.
2015-10-27 11:09:00 -04:00
Matthias Clasen
bb5b711d4b
shortcuts: Some property hygiene
...
Bring property notification for some of the new shortcuts widgets
up to the standards of our testsuite.
2015-10-27 09:25:17 -04:00
Matthias Clasen
ed00d86496
inspector: Allow editing css node properties
...
This reuses the property editor infrastructure from the
property list pages. Good that css nodes are objects.
2015-10-26 23:39:51 -04:00
Matthias Clasen
6852a1eef9
inspector: Support editing interned string properties
...
Sadly, interned string properties cannot be handled generically
at all - GObject insists on inserting a strcpy in any attempt
to set a string property with generic api, destroying the
internedness of the string.
Therefore, we have to special-case GtkCssNode in the property
editor code :-(
2015-10-26 23:39:51 -04:00
Matthias Clasen
b7d001e613
Add some api annotations
...
Nothing is using the /*interned*/ annotations currently,
but if we are doing this, we should be consistent.
2015-10-26 23:39:50 -04:00
Benjamin Otte
a648afae12
widget: Add name to widget paths
...
This changes widget paths for widgets with a CSS name to return that CSS
name, now that we have added API for it.
This means that style properties are now matches using the CSS name.
Also fix the theme to use the correct name when matching style properties.
2015-10-27 03:13:42 +01:00
Benjamin Otte
517cea36ed
cssmatcher: Actually match names for widget paths
...
The type is always 0 when we use names. So this would always return
FALSE. Oops.
2015-10-27 03:13:42 +01:00
Matthias Clasen
d717afd4d4
entry: properly update css subnode state
...
Update the state of the css subnodes for icons when
appropriate, and avoid calling set_state after save_to_node.
2015-10-26 22:09:07 -04:00
Matthias Clasen
c72d094ae0
entry: Use better element name for progress
...
Change the name of the CSS subnode for progress rendering from
progressbar to progress. This will align better with GtkProgressBar.
2015-10-26 21:34:16 -04:00
Robert Ancell
aefa1ba611
gdk: Deprecate gdk_display_get_screen
2015-10-27 14:17:52 +13:00
Benjamin Otte
101df329ae
API: Add gtk_widget_path_iter_set_object_name()
...
... and gtk_widget_path_iter_get_object_name(). This allows applications
that still use widget paths to use the new object names to get the
correct styling.
Mutter and webkit-gtk are examples here.
2015-10-27 01:44:50 +01:00
Jonas Ådahl
aedd193c69
GtkTreeView: Rework the search window hack so it also works on Wayland
...
The search window of a tree view was implemented by showing without
making it visible by by positioning it outside the screen edge. This is
not possible on Wayland, so implement another method for being able to
enter text into a non-visible entry.
The new method is implemented by, before showing the window, pass the
key event directly to the IM context backing the entry. If the key
event triggered the context to commit new text or change the preedit
content, the search window is shown, and from that point the key events
are forwarded directly to the entry widget.
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl
97dbef451e
GtkTreeView: Make a search window destroy helper
...
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl
2eb7d7476b
GtkTreeView: Use more consistent search window naming
...
Instead of alternating between search dialog and search window, use
search window everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Matthias Clasen
76619cf1ae
entry: Bring back icon padding
...
Not sure why this is necessary now, but it is.
2015-10-26 16:51:28 -04:00
Matthias Clasen
ed8641ff26
entry: Only set one of the .left, .right style classes
...
We were not removing the old style class when adding a new one.
2015-10-26 15:28:50 -04:00
Matthias Clasen
e28b3d1296
assistant: Handle page-type and title changes properly
...
We need to update our state when a pages' type or title changes.
2015-10-26 09:01:07 -04:00
Matthias Clasen
6efbf329c3
shortcuts: Cosmetic change
...
The .flat style class is controlled by the relief property,
so just use that instead of manually setting style classes.
2015-10-26 07:23:07 -04:00
Matthias Clasen
953aa45c04
label docs: Mention common style classes
...
Mention some of the style classes that are commonly used
with labels.
2015-10-26 07:23:07 -04:00
Olivier Fourdan
305b34aa15
GtkWindow: fix move/get position with CSD
...
Take into account and compensate for the size of the client side
decorations widgets in gtk_window_move() and gtk_window_get_pos()
including gravity.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-10-26 08:40:36 +01:00
Olivier Fourdan
3450f53907
GtkWindow: add up CSD size in gtk_window_resize()
...
When client side decoration is used, the size passed to
gtk_window_resize() or retrieved from gtk_window_get_size() for top-
level windows also accounts for the client side decorations widgets
such as the title bar or the shadow borders.
Add up the size of these additional controls to the given size to get
the size expected.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-10-26 08:40:36 +01:00
Matthias Clasen
bf65b06781
HighContrast: Don't use GtkInfoBar type name
...
We have a proper element name for it now.
2015-10-25 17:19:34 -04:00
Matthias Clasen
91ec104dd3
Adwaita: Don't use GtkInfoBar type name
...
We have a proper element name for it now.
2015-10-25 17:19:01 -04:00
Matthias Clasen
f1248ccea4
infobar: Add a name to the css node
...
This lets us avoid the type name in css.
2015-10-25 17:18:20 -04:00
Matthias Clasen
2de0f06af9
HighContrast: Update separator rendering
...
Adapt HighContrast t othe changes in the pre-previous commit.
2015-10-25 16:29:11 -04:00
Matthias Clasen
0ba03aac16
Adwaita: Update separator styling
...
Adapt Adwaita to the changes in the previous commit.
2015-10-25 16:28:38 -04:00
Matthias Clasen
2eb6599b29
separator: Use the element name separator
...
Switch GtkSeparator from using the .separator style class to
using the element name separator for its css node.
2015-10-25 16:27:44 -04:00
Matthias Clasen
aa67ad0011
Adwaita: Update accel label styling
...
Adapt Adwaita to the changes in the previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen
caa6fb0732
accel label: Use a css node for the accelerator
...
Use a permanent subnode with name accelerator instead of the
.accelerator style class.
2015-10-25 15:45:13 -04:00
Matthias Clasen
2b20bd54c5
HighContrast: Update spinner rendering
...
Adapt HighContrast to the changes in the pre-previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen
bd80b1d037
Adwaita: Update spinner styling
...
Adapt Adwaita to the changes in the previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen
9269525f07
spinner: Use the element name spinner
...
Switch GtkSpinner from using the .spinner style class to
using the element name spinner for its css node.
2015-10-25 15:45:13 -04:00
Matthias Clasen
f55e3f7eda
inspector: Be more careful with dead objects
...
gtk_inspector_object_tree_find_object accesses the type information
of the object, so we can't safely use it on an already decaying
object when we get a weak notify. Instead just walk the tree and
compare pointers, that is safe.
https://bugzilla.gnome.org/show_bug.cgi?id=756852
2015-10-25 13:11:17 -04:00
Matthias Clasen
4305aa1def
inspector: Improve css node UI
...
All the other object pages have a title, this one was missing it.
Add one, so the page fits in with the rest.
2015-10-25 09:20:43 -04:00
Matthias Clasen
1e112ca75e
inspector: Allow editing strv-valued properties
...
These do occur in some places, and we can easily allow editing
them.
2015-10-25 02:14:04 -04:00
Matthias Clasen
e440050134
Fix the build
2015-10-24 17:04:38 -04:00
Matthias Clasen
f1b7560938
notebook: Document css nodes and style class
...
This will have to be updates as we do further changes to the
way GtkNotebook does its rendering.
2015-10-24 10:54:56 -04:00
Matthias Clasen
8917ee5373
notebook: Drop unneeded code
...
We no longer need to set the position classes on the main css node,
since they are already set on the per-tab subnodes.
2015-10-24 10:39:18 -04:00
Matthias Clasen
9f738da11b
HighContrast: Update notebook styling
...
The switch from .notebook to notebook requires minor changes,
such as moving the style properties into a separate selector.
2015-10-24 10:39:18 -04:00
Matthias Clasen
a22e07f374
Adwaita: Update notebook styling
...
The switch from .notebook to notebook requires minor changes,
such as moving the style properties into a separate selector.
2015-10-24 10:39:18 -04:00
Matthias Clasen
f194b9608a
notebook: Use the element name notebook
...
Switch GtkNotebook from using the .notebook style class to
using the element name notebook for its main css node.
2015-10-24 10:39:18 -04:00
Matthias Clasen
e2bfe9e95a
notebook: Cosmetic cleanup
2015-10-24 10:39:17 -04:00
Matthias Clasen
431089f769
entry: Add css node documentation
...
List the css names and the typical style classes that can be
expected to occur with entries.
2015-10-23 16:22:25 -04:00
Matthias Clasen
78309d8b00
HighContrast: Update entry progress rendering
...
Adapt HighContrast to the changes in the pre-previous commit.
2015-10-23 16:16:55 -04:00
Matthias Clasen
d8a3a4e7aa
Adwaita: Update entry progress rendering
...
Adapt Adwaita to the changes in the previous commit.
2015-10-23 16:13:43 -04:00
Matthias Clasen
6a768ba218
entry: Use a permanent css node for progress
...
Create a css node with name progressbar when we start showing progress
in the entry. The node gets the style class .pulse added when we
do pulse mode.
2015-10-23 16:11:08 -04:00
Matthias Clasen
e39ca899ad
Adwaita: Update for entry icon changes
2015-10-23 15:41:05 -04:00
Matthias Clasen
f5e77d0c67
entry: Use css nodes for icons
...
Create css nodes for icons in entries, with name image, and use
gtk_style_context_save_to_node() for them. We still set the
style classes .left and .right on them.
2015-10-23 15:39:29 -04:00
Matthias Clasen
8a8518ed40
HighContrast: Update entry styling
...
Use the new element name instead of the style class.
2015-10-23 14:53:06 -04:00
Matthias Clasen
c6a7ceedc9
Adwaita: Update entry styling
...
Use the new element name instead of the style class.
There is some minor fallout for vertical spin buttons that
will need a second look.
2015-10-23 14:52:27 -04:00
Matthias Clasen
b2dd9cbc59
entry: Use the element name entry
...
Set the element name on the css node and drop the .entry class.
2015-10-23 14:51:35 -04:00
Lapo Calamandrei
5b0a26f8a3
Adwaita: fix switch styling
...
looks like switch stare are not passed to the slider anymore so
rewrite selectors accordingly.
2015-10-23 17:12:01 +02:00