Benjamin Otte
f34059c3b6
notebook: Convert header node to a gadget
...
This allows reworking the content node to do real height-for-width.
The content node also takes care of border width, but we might want to
have the toplevel do it or just get rid of it.
2016-01-11 17:05:22 +01:00
Benjamin Otte
8c1a73326c
gadget: Add helpers for modifying state
...
They will be used in future commits.
I also was too lazy to convert existing widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
e27551ddb2
notebook: Add a stack gadget
...
The stack gadget contains all the child widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
c03fed4840
notebook: Remove extra calls to gtk_notebook_pages_allocate()
...
The function is called during size_allocate() and doesn't need to be
called elsewhere, as all other callers call queue_resize() already.
2016-01-11 17:05:22 +01:00
Benjamin Otte
33b6e30f68
notebook: Remove unnessecary gtk_widget_set_mapped()
...
We chain up, and the chainedup function calls this for us.
2016-01-11 17:05:22 +01:00
Benjamin Otte
dc4148c4e2
notebook: Simplify gtk_notebook_map()
...
We set visibility on our children properly, so we can simply chain up
and let the GtkContainer implementation do the mapping of children.
2016-01-11 17:05:22 +01:00
Benjamin Otte
22398ef459
notebook: Remove irrelevant case
...
The page is never the current page, because it was just created and the
current page wasn't changed yet.
2016-01-11 17:05:22 +01:00
Benjamin Otte
0e528ec74e
notebook: No page switching in size request code
...
We have page switching under control now, we don't need to check every
get_preferred_size() call.
2016-01-11 17:05:22 +01:00
Benjamin Otte
1190efebce
notebook: Set the current page when none is set
...
This case happens when you gtk_widget_show_all (notebook).
2016-01-11 17:05:22 +01:00
Benjamin Otte
0045e57e96
notebook: Draw the same things, no matter the show-border value
...
show-border modifies the "frame" style class on the notebook node, but
not what we actually draw.
2016-01-11 17:05:22 +01:00
Benjamin Otte
fd9ffe5d57
notebook: Turn the base notebook into a gadget
2016-01-11 17:05:22 +01:00
Benjamin Otte
92089ee29e
notebook: Draw tab label while drawing tab
...
Instead of having special case code doing it.
2016-01-11 17:05:22 +01:00
Benjamin Otte
3d980da405
notebook: Don't translate before painting notebook
...
This will allow us to draw children directly from within the notebook
drawing code, which will remove a bunch of special casing.
2016-01-11 17:05:22 +01:00
Benjamin Otte
93dc364b02
notebook: Deprecate and stop supporting has-tab-gap style property
2016-01-11 17:05:22 +01:00
Benjamin Otte
71cc212eb5
notebook: Ignore and deprecate style properties
...
Deprecate initial-gap, tab-curvature and tab-overlap properties. All
their features can be achieved using CSS.
This CSS achieves the same effect as a 10px initial gap:
notebook header {
margin-left: 10px;
margin-right: 10px;
}
A tab overlap of 10px can be achieved via:
notebook tabs {
margin-left: 10px;
}
notebook tab {
margin-left: -10px;
}
And tab curvature is essentially the same as padding or border on a tab.
2016-01-11 17:03:07 +01:00
Benjamin Otte
0138af9f96
rendericon: Save and restore cairo matrix
...
... instead of requiring cairo_save()/cairo_restore().
2016-01-11 17:03:07 +01:00
Benjamin Otte
fa7816d99c
dnd: When setting a dnd icon widget, unset old one
...
Setting a DND icon twice should actually work and not cause warnings the
2nd time.
2016-01-11 16:56:16 +01:00
Krzesimir Nowak
67c6d24bb2
Fix a small mistake in stylecontext docs
...
Fix the "will be also be" to become "will also be".
2016-01-11 12:05:27 +01:00
Matthias Clasen
b035cc2cb6
Update style class docs
...
Instead of pointing to (outdated) widgets here, just refer to
widget docs in general.
2016-01-10 17:08:56 -05:00
Matthias Clasen
cffe2e2c93
Improve GtkStyleContext docs
...
Refer to the foreign drawing example in gtk3-demo, refer to
the widget documentation for style properties, remove
no-longer-used treeview regions.
2016-01-10 17:05:53 -05:00
Ting-Wei Lan
0f120ea510
Cast the return value of g_array_free to void* before casting to char**
...
Let the compiler know that we don't want to use it as char*, so there is
no alignment error.
https://bugzilla.gnome.org/show_bug.cgi?id=760350
https://bugzilla.gnome.org/show_bug.cgi?id=755659
2016-01-11 00:23:46 +08:00
Matthias Clasen
0ddc1eed19
Fix rendering of unsymmetric borders
...
There was an errant path that threw off our clipping for
the top section of the border.
https://bugzilla.gnome.org/show_bug.cgi?id=722937
2016-01-09 23:44:43 -05:00
Matthias Clasen
caaf537f94
Avoid division by 0 in the border rendering code
...
We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
2016-01-09 23:44:43 -05:00
Matthias Clasen
12bc8ddb93
Fix dobule border rendering
...
This is the same fix that was applied for ridge and groove
style in 9f27ee7f5a
.
2016-01-09 14:37:04 -05:00
Lapo Calamandrei
152171e60c
Adwaita: transparent background for progressbar.osd
...
Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=760331
Added the .osd style class to the progressbar docs.
2016-01-09 20:05:41 +01:00
Lapo Calamandrei
6da0a0a106
gtkheaderbar: add titlebutton styleclass to the separator
...
...of the window control buttons
2016-01-09 19:27:15 +01:00
Lapo Calamandrei
99365753bf
Adwaita: shortcut window related fixes
2016-01-09 18:03:26 +01:00
Lapo Calamandrei
44e0e1359c
Adwaita: avoid colorswatch growing when drop targets
2016-01-09 15:30:20 +01:00
Lapo Calamandrei
239303b3f8
Adwaita: more scss cosmetics
2016-01-09 14:36:05 +01:00
Lapo Calamandrei
2050ed04dd
Adwaita: rely on background-image for paned wide separators
...
this workaround fixes the rendering issue coming out using borders
2016-01-09 13:35:48 +01:00
Lapo Calamandrei
4355cb45d7
Adwaita: make the paned wide separator scss code correct
...
unfortunatelly the results are not, borders behaves in a weird way
here as well, if this don't get fixed I'll rely on background here
too.
2016-01-09 13:04:27 +01:00
Lapo Calamandrei
2b57ba61d5
Adwaita: some scss cosmetic changes
2016-01-09 12:38:49 +01:00
Lapo Calamandrei
f09483bb98
Adwaita: fix thin paned separators
2016-01-09 12:31:41 +01:00
Lapo Calamandrei
b143ed98b3
Adwaita: use stricter selectors on paned separators
...
this fixes the "fat" separator on gedit headerbar, since it was
cought by the paned separator styling.
2016-01-09 12:07:52 +01:00
Lapo Calamandrei
367543c0e8
Adwaita: remove old headerbar separator styling
...
which was actually selecting nothing now.
2016-01-09 11:55:40 +01:00
Lapo Calamandrei
4853303dd7
Adwaita: add vertical margins to headebar entries and separators
2016-01-09 11:25:08 +01:00
Lapo Calamandrei
bf48dd9d7c
Adwaita: add vertical margins to headerbar buttons
...
to avoid them spanning the whole headerbar height with the changes
introduced in my last commit.
2016-01-09 10:19:47 +01:00
Matthias Clasen
375619f9f4
Fix make dist
...
I've forgotten another place when renaming HighContrast inverse.
2016-01-08 18:29:58 -05:00
Matthias Clasen
4b7c8218fb
Use standard cursor names for DND
...
At least as far as we have them. CSS has on equivalent of dnd-ask,
so we keep using that name as-is.
2016-01-08 18:11:07 -05:00
Cosimo Cecchi
f2685ddf5e
colorswatch: don't apply padding twice
...
Instead of taking the border and manually removing it from the
allocation, render our background over all the border allocation box, as
that's more correct and does not take padding into account twice.
2016-01-08 14:58:25 -08:00
Carlos Garnacho
e62f1604f9
paned: Use GtkGestureDrag for anything else than touch
...
The GtkGesturePan behavior of locking onto certain orientations may
come across as confusing, and is not strictly necessary for mice and
other pointing devices.
As GtkGesturePan is also a GtkGestureDrag, we just use the same
callbacks on both gestures.
https://bugzilla.gnome.org/show_bug.cgi?id=759670
2016-01-08 22:03:05 +01:00
Lapo Calamandrei
48fbe5137e
Adwaita: avoid too tall headerbars
...
the vertical padding from the headerbar has been removed, now the
sizing is done with min-height, this avoids title and subtitle
labels making the headbar.
2016-01-08 20:56:40 +01:00
Matthias Clasen
3f56c530b3
Be more careful with floating point divisions
...
The assumption that MIN() takes care of all infinities here
turns out to be wrong. We were getting inf and -nan for some
combinations of 0 width/height and corners, leading to invalid
matrices and cairo errors.
https://bugzilla.gnome.org/show_bug.cgi?id=759668
2016-01-08 13:17:58 -05:00
Matthias Clasen
d3aea5c498
Forgotten file
...
One was forgotten in the dark -> inverse rename.
2016-01-08 11:12:55 -05:00
Matthias Clasen
000b5b9055
color editor: Set a name on the color sample
...
This can be used to tweak the style from CSS, via #editor-color-sample.
2016-01-08 11:10:02 -05:00
Lapo Calamandrei
91123adba7
Adwaita: remove some now uneeded selectors
...
...related to image-button sizing which is handled differently now.
2016-01-08 16:48:01 +01:00
Lapo Calamandrei
5de71413fe
Adwaita: colorchooser and color button style rewrite
...
fixing https://bugzilla.gnome.org/show_bug.cgi?id=760169 in the
process.
2016-01-08 16:41:58 +01:00
Matthias Clasen
d72e061bb9
Rename the HighContastInverse css files
...
Renaming the files from -dark to -inverse makes it more obvious
that this is not a dark variant in the sense of the 'prefer-dark'
setting, but rather a separate theme (sharing the same CSS).
2016-01-08 07:39:17 -05:00
Matthias Clasen
9f247e112b
Deprecate cursor-color style properties
...
These have been replaced by CSS properties.
2016-01-08 07:33:20 -05:00
Matthias Clasen
9b86d6da2c
Use the caret-color properties for drawing carets
...
Replace the cursor-color and secondary-cursor-color style
properties with the caret-color and -gtk-secondary-caret-color
CSS properties.
For the 'auto' value of these properties, we keep the same
behavior that we used to have when the style properties are
not explicitly set.
2016-01-08 07:33:20 -05:00