Matthias Clasen
7859f8ee91
checkbutton: Use a box gadget
...
Now that builtin icons have a baseline, we can just use
a box gadget with baseline alignment for the indicator
and the label.
2016-01-17 21:16:33 -05:00
Matthias Clasen
da30858ee4
builtin icon: set a baseline
...
Most uses of builtin icons (check and radio buttons,
expanders, etc) are placed next to labels, so they should
be properly positioned wrt to the baseline. Lacking anything
better, give the builtin icons a baseline that places the
center of the icon at the strikethrough position.
2016-01-17 21:02:18 -05:00
Matthias Clasen
9c3907dab0
box gadget: Deal with optional arguments
...
The baseline arguments to the preferred size callback can
be NULL. Don't crash if they are.
2016-01-17 19:48:40 -05:00
Matthias Clasen
44d94a4aeb
Trivial formatting fix
2016-01-17 15:35:14 -05:00
Matthias Clasen
a7387e2641
Document restrictions on gtk_style_context_get
...
This makes it official that passing a different state
is not generally supported in the getters for CSS properties.
2016-01-17 15:31:37 -05:00
Matthias Clasen
6bf9715ce4
notebook: show tabs when asked to
...
gtk_notebook_set_show_tabs must make the header gadget
visible when show_tabs is TRUE, not the other way around.
https://bugzilla.gnome.org/show_bug.cgi?id=760596
2016-01-17 14:35:58 -05:00
Matthias Clasen
9e2a1685c5
accel label: Fix RTL handling
...
The 'mad hack' that GtkAccelLabel used to affect the GtkLabel
draw function broke with the introduction of gadgets, since
the positioning is no longer relative to the widgets' allocation
at the time of the call, but rather to the gadgets allocation.
Instead of coming up with an even madder hack to keep this
working, give the GtkLabel draw function knowledge about accel
labels.
https://bugzilla.gnome.org/show_bug.cgi?id=760663
2016-01-17 14:08:22 -05:00
Matthias Clasen
d28959c6db
inspector: Make cursor-size combo wider
...
Cursor sizes typically have 2 digits, lets not clip them.
2016-01-17 13:23:49 -05:00
Matthias Clasen
00aca5d689
Expand window style class documentation a bit
2016-01-17 12:13:59 -05:00
Matthias Clasen
9d26038a10
Adwaita: Keep entry progress visible
...
When the entry is focused, make the progress one pixel wider
so it doesn't get swallowed by the focus outline.
2016-01-16 19:23:26 -05:00
Benjamin Otte
6e6cbd7316
stylechange: Do the right thing when old and new style are equal
...
We don't need to compare all their CSS values to figure out that nothing
changed. We know that.
2016-01-16 23:58:37 +01:00
Benjamin Otte
c904efef53
cssnode: Redo GTK_DEBUG=no-css-cache
...
Previously this setting would just invalidate the whole CSS tree and
thereby hopefully avoid all cache usage.
Now, we actually don't cause extra invalidations anymore, but instead
avoid ever inserting anything into the cache when this setting is set.
2016-01-16 23:58:37 +01:00
Benjamin Otte
024429f76f
cssnode: Implement the style cache
...
This essentially copies the previous cache implementation. With one
caveat: It is now attached to and maintained by the CssNode, not by the
CssStyle.
And this is important because styles may be reused in incompatible
situations which would cause cache collisions and lead to broken CSS in
weird situations.
2016-01-16 23:58:37 +01:00
Benjamin Otte
5d562b6a2a
cssnode: Split out the style cache
...
For now, the split out style cache doesn't cache anything. This is
mostly to make sure that bisections of wrong caching behavior will
bisect down to the commit that actually adds caching.
2016-01-16 23:58:37 +01:00
Lapo Calamandrei
93f8fa7576
Adwaita: stop axing toolbar separators
2016-01-16 04:16:55 +01:00
Lapo Calamandrei
d0f83d46a0
Adwaita: style textview derived widgets
2016-01-16 04:15:30 +01:00
Matthias Clasen
e7fc87e4ac
color scale: Improve themability
...
Add the .color class, so themes can style scale.color.
Clip the trough rendering to the content path, so that
themes can set rounded corners.
2016-01-15 20:08:57 -05:00
Matthias Clasen
a0d91a3a71
treeview: Use foreground color to draw dnd marker
...
This is still not perfect, but makes the dnd marker better visible
in HighContrastInverse.
2016-01-15 19:39:12 -05:00
Matthias Clasen
2cf810c4c9
frame: Don't overlap label and child
...
We didn't do this previously, so don't start now.
https://bugzilla.gnome.org/show_bug.cgi?id=760528
2016-01-15 19:16:23 -05:00
Lapo Calamandrei
f32e1d42e6
Adwaita: combo style cleanup and fixes
...
fixes https://bugzilla.gnome.org/show_bug.cgi?id=760524
2016-01-16 01:03:08 +01:00
Matthias Clasen
e8b9aacfc1
combo: Add .linked class when appropriate
...
Add the .linked style class to combo boxes which have
an entry, since that is what they are.
2016-01-15 17:55:44 -05:00
Matthias Clasen
54a6e032ca
combobox: Document the popup window CSS node
2016-01-15 17:48:39 -05:00
Matthias Clasen
0049be4e58
application: Protect against double shutdown
...
It is not something that can happen normally.
But if it does, we shouldn't crash.
https://bugzilla.gnome.org/show_bug.cgi?id=760680
2016-01-15 17:37:55 -05:00
Matt Watson
d8bb228d3b
widget: remove queue_resize in set_sensitive
...
Calling gtk_widget_propagate_state is enough to queue a resize if
needed
See da7a4089fe
2016-01-15 11:07:47 -08:00
Lapo Calamandrei
04f6f38b56
Adwaita: remove messagedialog label squashing hack
...
since Matthias fixed this properly.
2016-01-15 18:37:49 +01:00
Matthias Clasen
78162c5e88
message dialog: Prevent empty title from being shown
...
We don't want to grow the titlebar by showing an empty label.
2016-01-15 11:59:33 -05:00
Lapo Calamandrei
fc804bba2d
Adwaita: some dialog love
...
addresses https://bugzilla.gnome.org/show_bug.cgi?id=760525
2016-01-15 17:57:25 +01:00
Matthias Clasen
6d18b77ca7
expander: Destroy gadgets after child widgets
...
With child widgets now being sorted into box gadgets, bad things
happen if those gadgets disappear prematurely.
2016-01-15 10:30:08 -05:00
Benjamin Otte
6e4d65d227
notebook: Destroy gadgets after chaining up
...
While chaining up, we might still call into the notebook code. And that
code expects the gadgets to be there.
https://bugzilla.gnome.org/show_bug.cgi?id=760640
2016-01-15 16:22:22 +01:00
Matthias Clasen
2e27c0af25
expander: Convert to use box gadgets
...
Use a vertical box gadget for the overall expander, and a
horizontal one for the title row. This lets us get rid of
all the custom allocation code here.
2016-01-15 09:43:51 -05:00
Matthias Clasen
5f5dc10820
expander: Deprecate spacing property
...
The same can be achieved with margins on the child, and
the spacing property gets in the way of converting the
expander to use box gadgets.
2016-01-15 09:43:51 -05:00
Matthias Clasen
87171469b7
box gadget: Implement cross-axis alignment
...
So far, the box gadget is always allocating all children the
full size in the cross axis. This behavior corresponds to the
align-items: stretch behavior in
https://www.w3.org/TR/css-flexbox-1/#align-items-property
This commit implements the other modes described there.
While widgets have halign/valign properties that we can use for
this, the API for inserting gadgets has to change to take an
extra align parameter. All callers have been updated to pass
GTK_ALIGN_FILL, since that corresponds to the previous behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=760668
2016-01-15 09:43:12 -05:00
Tom Schoonjans
967ecc80d3
Windows library manager fix
...
The Makefile.am's had a dependency on incorrectly named libtool
archives for the generation of the .lib files.
https://bugzilla.gnome.org/show_bug.cgi?id=760388
2016-01-15 11:16:32 +01:00
Alberts Muktupāvels
c60cea3037
gtkwidgetpath: update gtk_widget_path_to_string
...
From gtk_widget_path_iter_set_object_name documentation:
"When set, the object name overrides the object type when matching CSS"
Update gtk_widget_path_to_string to match this behaviour.
2016-01-15 00:36:23 +02:00
Eric Williams
276101a3bc
Fix typo in previous documentation fix for gtk_css_provider_load_from_data()
2016-01-14 17:01:26 -05:00
Matthias Clasen
beec55a22b
Add a way to load recolored icons in CSS
...
This can come in handy to load images that are not in an icon theme,
but still benefit from symbolic recoloring.
https://bugzilla.gnome.org/show_bug.cgi?id=760536
2016-01-14 13:51:15 -05:00
Matthias Clasen
1b0ef71696
icon theme: Export recoloring function
...
This will be used in subsequent commits.
https://bugzilla.gnome.org/show_bug.cgi?id=760536
2016-01-14 13:51:09 -05:00
Matthias Clasen
7d717c8113
icon theme: Add a way to create GtkIconInfos from files
...
This is sometimes needed, and calling into actual icon theme
code just for it is confusing - the resulting icon does not
depend on the icon theme at all.
https://bugzilla.gnome.org/show_bug.cgi?id=760536
2016-01-14 13:50:58 -05:00
Lapo Calamandrei
c667f9f1d1
Adwaita: pathbar style cleanup
2016-01-14 17:54:31 +01:00
Florian Müllner
ea69bf8c17
cssstyleproperty: Expose min-width/height
2016-01-14 17:20:51 +01:00
Lapo Calamandrei
bc2355e0b1
Adwaita: remove superfluous selector on keycap styling
...
now that keys are made directly with labels istead of frames.
2016-01-14 16:26:22 +01:00
Timm Bäder
4703d2bbf0
boxgadget: Don't use g_assert
...
Use g_return_if_fail instead so nothing abort()s.
2016-01-14 16:02:36 +01:00
Timm Bäder
a5fabee202
entry: Don't draw icons twice
2016-01-14 16:02:12 +01:00
Timm Bäder
49d251a330
entry: Remove unused code
2016-01-14 16:02:12 +01:00
Timm Bäder
2397d76137
label: Remove some unneeded conditionals
...
We are never passing NULL here.
2016-01-14 16:02:12 +01:00
Timm Bäder
6a97b2563b
shortcutlabel: Use a label directly
...
We can everything we need without the frame around it now.
2016-01-14 16:02:12 +01:00
Руслан Ижбулатов
e44b420617
Ensure that the fstat fix is not applied on x86_64
2016-01-14 12:52:04 +00:00
Matthias Clasen
0acc6578d8
expander: center the arrow
...
In lieu of more sophisticated alignment, we need to at least
center the arrow allocation wrt to the label.
2016-01-14 07:35:59 -05:00
Руслан Ижбулатов
59f1b87409
W32: Ensure that correct statting function is used by iconcache
...
With Mingw-w64 fstat() can be an inline function that
calls _fstat32() or _fstat64(), depending on some macros.
And if LFS is enabled, fstat() is defined to turn into
_fstat32i64() or _fstat64(). And some/all of the above
might also be macros as well. Side-step all that mess
and excplicitly re-define fstat as _fstat32, which is
guaranteed to use a version of "stat" struct that
has 32-bit size and time fields, which is what we want.
https://bugzilla.gnome.org/show_bug.cgi?id=760615
2016-01-14 09:44:22 +00:00
Matthias Clasen
d2e80a7993
font chooser: Add a CSS name
...
The CSS name for GtkFontChooserWidget is fontchooser.
2016-01-13 23:42:35 -05:00
Matthias Clasen
c80adc33a4
app chooser: Set a CSS name
...
The CSS name for GtkAppChooserWidget is appchooser.
2016-01-13 23:41:38 -05:00
Matthias Clasen
9657ec9331
print dialog: Set a CSS name
...
The CSS name for GtkPrintUnixDialog is printdialog.
2016-01-13 23:41:38 -05:00
Matthias Clasen
704b41b504
file chooser: Set a CSS name
...
The CSS name for GtkFileChooserWidget is ... filechooser.
2016-01-13 23:41:38 -05:00
Matthias Clasen
2f169a493b
color chooser: Set a CSS name
...
The CSS name for GtkColorChooserWidget is ... colorchooser.
2016-01-13 23:41:38 -05:00
Matthias Clasen
dc5c82e29c
inspector: Don't select 'randomly'
...
While rescanning the object tree, we were emitting ::object-selected
signals, possibly causing wild blinking in the application window.
Don't do that.
https://bugzilla.gnome.org/show_bug.cgi?id=760572
2016-01-13 23:24:38 -05:00
Matthias Clasen
1009c88186
Make -gtk-icontheme() use -gtk-icon-palette
...
This makes it possible to recolor themed icons with -gtk-icon-palette,
regardless whether they are loaded by the theme or the application.
2016-01-13 16:17:44 -05:00
Matthias Clasen
34c263683c
Move the -gtk-icon-palette property up
...
Other properties will start depending on it in subsequent
commits, so move it up to prevent ordering problems.
2016-01-13 16:16:39 -05:00
Matthias Clasen
1f65f1b746
color swatch: Use right allocation for window
...
Generally, input-only windows that correspond to CSS boxes
should be sized to the border allocation of the gadget.
2016-01-13 14:00:10 -05:00
Cosimo Cecchi
897126ae2b
notebook: fix a GCC warning
2016-01-13 08:30:02 -08:00
Matthias Clasen
fb77ebe17e
paned: Update node ordering according to text direction
...
This was overlooked in the initial node conversion.
2016-01-13 00:40:11 -05:00
Matthias Clasen
7743944124
GtkBox: Documentation tweak
2016-01-13 00:39:53 -05:00
Matthias Clasen
93aac8a86c
notebook: Document the .dnd style class
...
We should aim to document all style classes that themes
can encounter during the normal operation of a widget.
2016-01-13 00:24:40 -05:00
Matthias Clasen
ea4cff1ea4
Use convenience API that was introduced recently
...
Use gtk_css_gadget_set_state in all the places where we previously
were getting a node from a gadget, just to call gtk_css_node_set_state.
2016-01-13 00:19:31 -05:00
Matthias Clasen
64b499be66
builtin icon: Don't save/restore cairo state
...
The reason why this was introduced is now handled in
gtk_css_stylke_render_icon since commit
0138af9f96
.
2016-01-13 00:01:14 -05:00
Matthias Clasen
c71089a038
box gadget: Add some documentation
2016-01-12 23:57:35 -05:00
Matthias Clasen
2677eee720
box: Document child node ordering
2016-01-12 23:40:28 -05:00
Timm Bäder
b8db48079f
switch: Fix text positioning
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:53 +01:00
Timm Bäder
a8ceeb1766
switch: Don't include margins in input window size
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:53 +01:00
Timm Bäder
ff7e2797f6
modelbutton: Don't include margins in input window size
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:49 +01:00
Timm Bäder
788ee466b8
button: Don't include margins in input window size
...
And do the same thing for GtkCheckButton
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:44 +01:00
Timm Bäder
19fa893067
entry: typo
2016-01-12 21:54:45 +01:00
Matthias Clasen
c5d3556f98
HighContrast: Fix selection in .views
...
Copy Adwaita fixes from 21a2fce8ba
.
2016-01-11 23:20:26 -05:00
Matthias Clasen
52a34d32bb
Fix corner manipulation when growing rounded rects
...
This addresses problems with uneven border radius',
pointed out by Lapo.
2016-01-11 22:49:40 -05:00
Ben Iofel
7e5952c4ea
GTK Notebook: use the right enum type
2016-01-11 19:16:36 -05:00
Lapo Calamandrei
1c3bad3d90
Adwaita: popover style fixes
2016-01-12 01:03:47 +01:00
Lapo Calamandrei
21a2fce8ba
Adwaita: make selection visible in treeview derived widgets
...
See https://bugzilla.gnome.org/show_bug.cgi?id=757503
2016-01-12 00:16:12 +01:00
Hashem Nasarat
473433c93d
Adwaita: fix separator margin in popovers
...
Commit 0b96b8a1
set margins via css, but accidentally changed the
semantics of margins for separators in popovers so that any separator
in a gtkpopover had a margin. This meant that the separators in
GtkListBoxes in popovers also had a margin around their separators, and
this is not what we want because it doesn't match separators in
listboxes not in popovers.
https://bugzilla.gnome.org/show_bug.cgi?id=760427
2016-01-11 23:40:25 +01:00
Carlos Garnacho
0167f7c65c
GtkWidget: Fix motion event consumption detection for touch-only gestures
...
If a GtkGestureSingle is set as touch-only, pointer events would be
discarded without giving an opportunity to the regular GtkGesture
handler to manage those.
Because the pointer events weren't actually managed by the gesture,
gtk_gesture_get_sequence_state() (rather unhelpfully here) will resort
to returning GTK_EVENT_SEQUENCE_NONE, which is in turn interpreted
by _gtk_widget_consumes_motion() as "may be handling the events for
this sequence", because gestures in this state presumably handle
the events, just that it's not "claimed" yet.
Instead, use gtk_gesture_handles_sequence(), which will perform the
expected check on the event sequence being managed, as we expect
here.
2016-01-11 20:16:06 +01:00
Matthias Clasen
32eda187ee
Actually deprecate GtkNotebook::has-tab-gap
2016-01-11 13:58:37 -05:00
Matthias Clasen
990be25d63
notebook: Update CSS node docs
...
The stack node is new.
2016-01-11 13:55:23 -05:00
Benjamin Otte
3a8dc01ed2
notebook: Don't reparent tab label when drag stops
...
Use the same unrealize + set_parent_window() trick that we used in
6d5edd18cf
when dragging starts.
2016-01-11 17:52:38 +01:00
Benjamin Otte
b917a0b155
notebook: Add .dnd style class to tabs during reorder
2016-01-11 17:46:15 +01:00
Benjamin Otte
6d5edd18cf
notebook: Don't unparent tab label for drag
...
When a tab drag starts, we need to move the tab label into the drag
window via gtk_widget_set_parent_window().
If we don't unparent, but just unrealize the widget, we don't lose the
cssnode position.
2016-01-11 17:06:46 +01:00
Benjamin Otte
fdc13f315b
notebook: Don't limit motion notify framerate
...
We have a frameclock for that these days.
In particular, this limiting worked at 45fps when monitors are all 60fps.
2016-01-11 17:06:46 +01:00
Benjamin Otte
d74c1bfd84
notebook: Remove outdated style properties from themes
...
No replacement provided, the notebook will have to be redone anyway.
2016-01-11 17:06:46 +01:00
Benjamin Otte
8020d5f93a
notebook: Don't store gadget allocation twice
...
If we care about a gadget's allocation, we can ask it. There's no need
to store it in GtkNotebookPage.allocation.
2016-01-11 17:05:24 +01:00
Benjamin Otte
2ef3b01442
notebook: No need to recompute remaining space
...
The value is correct.
In particular, subtracting width on notebooks with tabs on left/right is
a very bad idea.
2016-01-11 17:05:24 +01:00
Benjamin Otte
4c083f8182
notebook: Port arrows to be gadgets
...
Also deprecate the arrow-spacing style property.
2016-01-11 17:05:24 +01:00
Benjamin Otte
326fda1b0e
notebook: Pass full allocation instead of min and max value
2016-01-11 17:05:24 +01:00
Benjamin Otte
96f0cf7677
notebook: Pass allocation as argument
...
... instead of querying it later.
2016-01-11 17:05:23 +01:00
Benjamin Otte
6b8c191096
notebook: Simplify allocation code
2016-01-11 17:05:23 +01:00
Benjamin Otte
0e48216c48
notebook: Identify existence of arrows differently
...
Instead of having gbooleans in the priv struct, just look at the
existence of priv->arrow_node[i].
2016-01-11 17:05:23 +01:00
Benjamin Otte
a12e1328e9
notebook: Convert tab nodes to gadgets
...
The code does many bad things, so we get a lot of warning spew. Ignore
this for now, fixes will follow.
2016-01-11 17:05:23 +01:00
Benjamin Otte
d780ce3ff3
notebook: Assume tab allocations always change
...
This causes more redraws, but saves a bunch of code.
2016-01-11 17:05:23 +01:00
Benjamin Otte
7e0c7f7deb
notebook: Remove weird hack where the current page was special-cased
...
I don't even know what it does, but it assumed that the current page was
always as large or larger than any other page. And that isn't true.
2016-01-11 17:05:23 +01:00
Benjamin Otte
3cda7e9503
boxgadget: Handle css nodes
...
Automatically insert the cssnode into the box gadget's node's children at
the right place and remove it again when done.
2016-01-11 17:05:23 +01:00
Benjamin Otte
a9320d93f6
notebook: Replace redraw_tabs() with gadget_queue_draw(tabs_gadget)
2016-01-11 17:05:23 +01:00
Benjamin Otte
f83c1fedbc
notebook: Don't queue redraw of tabs junction
...
There is no junction anymore, so don't try to redraw it.
2016-01-11 17:05:23 +01:00
Benjamin Otte
f1e277969a
gadget: Add queue_resize/allocate/draw() functions
2016-01-11 17:05:23 +01:00
Benjamin Otte
e1722baf57
notebook: Convert tabs node to a gadget
...
And in turn, convert the header gadget to a box gadget.
2016-01-11 17:05:23 +01:00
Benjamin Otte
acc534ebfa
boxgadget: Add
...
Adds a GtkBoxGadget that is a Gadget that behaves like a GtkBox.
Use this gadget to implement the notebook base gadget.
2016-01-11 17:05:23 +01:00
Benjamin Otte
749855c1d1
notebook: Remove unused function call
2016-01-11 17:05:23 +01:00
Benjamin Otte
70b9aacfc2
notebook: Simplify event window position computation
...
The event window should overlay the header gadget, so just return its
position.
2016-01-11 17:05:23 +01:00
Benjamin Otte
ad245e0226
notebook: Introduce gtk_notebook_has_current_page()
...
GtkNotebook does not switch the current page if all pages are hidden. So
it may be that no visible page exsits, but there still is a current
page set.
We culd clear the current page, but I'm unsure about backwards
compatibility.
So instead, this new function handles that case.
2016-01-11 17:05:23 +01:00
Benjamin Otte
0d72055b89
notebook: Use gtk_container_class_handle_border_width()
2016-01-11 17:05:23 +01:00
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