Commit Graph

25330 Commits

Author SHA1 Message Date
Matthias Clasen
9c39232ab3 assistant: Drop unnecessary frame
We can just style the sidebar box itself, no need for an
extra frame widget.
2016-01-03 10:33:54 -05:00
Matthias Clasen
adfb76dc7e lockbutton: Use a stack
The previous way of manually juggling the visibility of the
labels doesn't work anymore, now that gadgets of invisible
widgets don't allocate space anymore.
2016-01-03 09:55:30 -05:00
Matthias Clasen
68edc47f6a Add a function to dump CSS nodes and styles
Add a gtk_style_context_to_string function that can serialize
a CSS node or tree of nodes, optionally including CSS properties
as well.

This will be useful in writing tests.
2016-01-03 09:19:30 -05:00
Cosimo Cecchi
a6624d803e infobar: remove unneeded gadget
It turns out we don't really need to use a separate gadget for the
infobar, if all we do is chaining up to the parent GtkBox which already
uses a gadget.
Just remove all the boilerplate.
2016-01-03 01:02:12 -08:00
Cosimo Cecchi
ef8a5fc542 window: remove unused variables 2016-01-03 00:54:16 -08:00
Cosimo Cecchi
424898e071 levelbar: consolidate code into single function 2016-01-03 00:45:43 -08:00
Cosimo Cecchi
a6e7e72d53 levelbar: port to use gadgets
We now use one gadget for the trough, and one for each block.
2016-01-03 00:45:43 -08:00
Cosimo Cecchi
971f1a9b31 levelbar: split out a function 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
feb741babf infobar: port to use a gadget 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
f246dc1c85 infobar: trivial code cleanups 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
d8b6dbd888 menubar: prefer early return 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
700286c6d8 menubar: port to use a gadget 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
96f10c0b72 menubar: use gtk_container_class_handle_border_width() 2016-01-03 00:44:05 -08:00
Cosimo Cecchi
4328a3a24b HighContrast: remove unused selector
There's no header-bar-separator style class.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
a9d07b6ec6 Adwaita: remove unused selector
There's no header-bar-separator style class.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
28911c595b HighContrast: update for separators deprecations
HighContrast still has a long way to go, but let's get at least
separators working again.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
7dacc7836f HighContrast: reparse theme
For some reason, this got accidentally changed in a previous commit.
This is just the output of running parse-sass.sh again.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
39beebd2cb win32: remove ineffective selector
That style property is deprecated, but the combobox does not have a
separator anymore.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
908deb1bdc widget: deprecate separator style properties
They're not used in GTK anymore. Also remove them from the default
theme.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
64a06adfc0 treeview: don't use wide-separators/separator-height
Those style properties are on their way out; instead, use min-height
with the separator style class to obtain the height.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
2eb7e6a85a treeview: prefer positive polarity in if block 2016-01-03 00:42:51 -08:00
Cosimo Cecchi
1f690ddbfa separator: don't read wide-separators style property
The notion of a separator being wide or not does not make sense when a
theme can set any CSS property on it, and
separator-width/separator-height are on their way out for
min-width/min-height.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
0740f23c77 menuitem: don't read wide-separators or separator-height
Separators inside menus are working completely through CSS since
GtkMenuItem has been ported to use a gadget.
Remove this unused code from here.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
eff8865ab1 separatortoolitem: don't use custom sizing/rendering
Instead, just rely on the CSS gadget; we can stop using wide-separators,
separator-height and separator-width, and at the same time deprecate the
space-size style property of GtkToolbar.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
55e80f9379 separatortoolitem: trivial code cleanups 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
ea25985b67 toolbar: deprecate GtkToolbarSpaceStyle and space-style style property
This is completely unused already.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
48596090af toolbar: port to use a gadget 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
d64304997f toolbar: use gtk_container_handle_border_width() 2016-01-03 00:41:32 -08:00
Cosimo Cecchi
10c222649e toolbar: trivial code cleanup 2016-01-03 00:41:32 -08:00
Felix Riemann
6df8bc2e1a GtkBindings: Fix CSS key in example docs
gtk-key-bindings was renamed to -gtk-key-bindings in d267b8e0.

https://bugzilla.gnome.org/show_bug.cgi?id=760082
2016-01-03 02:04:11 -05:00
Christoph Reiter
6d77b9f316 gtkwindow: fix first allocation size
67ab00e01e removed the fake configure code in gtk_window_show() and
replaced it with a simple gtk_widget_realize(). The initial allocation
code in realize() only allocates the natural size or the last requested
size which now no longer is set, resulting in a too small first allocation.

This builds a configure request to compute the allocation size instead
which includes default size, CSD etc..

This problem could be seen in case of a GtkPaned in a GtkWindow with a
default size set and the pane position set as well. The first allocation
would be the natural size of the GtkPaned which would clamp the pane
position if too larg. Only the second allocation would fill the parent
window using the now wrong pane position.

https://bugzilla.gnome.org/show_bug.cgi?id=759705
2016-01-02 22:12:12 -05:00
Matthias Clasen
e93d64e4c3 Revert "Revert "window: Remove suspicious branch""
This reverts commit 2438a06d54.

See https://bugzilla.gnome.org/show_bug.cgi?id=759705
2016-01-02 22:12:12 -05:00
Cosimo Cecchi
6322b1f647 levelbar: fix a crash
We should not try to access a block with an index that exceeds the
number of blocks in the widget.
2016-01-02 18:44:07 -08:00
Matthias Clasen
8109520d4e separator toolitem: Respect ::draw property
This was lost when I converted the widget to use a gadget.

https://bugzilla.gnome.org/show_bug.cgi?id=760018
2016-01-02 20:55:37 -05:00
Cosimo Cecchi
0401146896 spinbutton: fix a typo 2016-01-02 15:31:23 -08:00
Cosimo Cecchi
664bbe12ba menuitem: move chaining up to draw inside gadget
This is more consistent with what other widgets do.
2016-01-02 15:31:21 -08:00
Timm Bäder
3758762119 GtkImage: Simplify _set_from_icon_name
We don't need to strdup icon_name since that will happen in
_gtk_icon_helper_set_icon_name anyway.
2016-01-02 15:46:45 +01:00
Christoph Reiter
558fb1ecdd gtkdnd-quartz: fix gtk_drag_begin_internal
gtk_drag_begin_internal was changed to take a GtkImageDefinition
instead of a GtkIconHelper. This adjusts the quartz variant
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=759607
2016-01-01 15:05:23 +01:00
Alberts Muktupāvels
a90926c7f0 gtkheaderbar: update window buttons also on realize
After bb34db6 _gtk_header_bar_update_window_buttons function is
called before application menu is set. This caused regression -
app menu button is initially hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2016-01-01 15:55:37 +02:00
Руслан Ижбулатов
a8ae549ed0 Fix include path for gtkiconfactoryprivate.h 2015-12-30 21:57:29 +00:00
Руслан Ижбулатов
91bb91dbb9 Fix to compile for C libraries with no flockfile
Also use MS variant of flockfile, if available
(requires MSVCRT compatible with MSVCR90 or newer).
2015-12-30 21:57:29 +00:00
Cosimo Cecchi
f357ef5610 scrolledwindow: add missing deprecation flag 2015-12-30 10:44:12 -08:00
Cosimo Cecchi
354eb5678b menuitem: fix a crash when reserve_indicator is TRUE
In that case, code expects an arrow gadget to be present but we're not
creating it in every occurrence.
Fix it by ensuring there will be an arrow gadget when reserve_indicator
is TRUE.
2015-12-29 18:31:10 -08:00
Cosimo Cecchi
3740c7f092 toolitem: fix a copy/paste typo 2015-12-29 16:33:53 -08:00
Cosimo Cecchi
79c045ed80 scrolledwindow: port to use a gadget 2015-12-29 13:51:06 -08:00
Cosimo Cecchi
7c0f0e882a scrolledwindow: deprecate scrollbars-within-bevel style property
These days all the themes set it to TRUE, and it's not clear what
happens with overlay scrollbars...
2015-12-29 13:51:06 -08:00
Cosimo Cecchi
09835b4c39 viewport: don't render a background over the bin window
GtkViewport currently tries to draw a background over the bin window.
The feature is a bit broken at the moment, as it does not take into
account padding that might have been set on the GtkViewport, but in
general it does not seem very useful, and goes somewhat against the CSS
box model where every widget/gadget is responsible to draw its own
background. For a fix, we could either have the viewport gain a "bin"
gadget, or we could stop drawing the background.

As it isn't clear that there are any users of this feature, stop drawing
the background; a client can achieve the same effect by drawing the
background on the widget inside the viewport itself.
2015-12-29 13:50:19 -08:00
Cosimo Cecchi
5daede51f7 viewport: port to use a gadget
This will get us margin support, among other things, and simplifies the
code.
2015-12-29 13:50:19 -08:00
Cosimo Cecchi
71d7b10dad viewport: trivial code cleanup 2015-12-29 13:50:19 -08:00
Cosimo Cecchi
a37129fd60 viewport: use gtk_container_class_handle_border_width()
No need to do this manually.
2015-12-29 13:50:19 -08:00