Cosimo Cecchi
d000b212c6
range: fix fill level for vertical inverted scales
2016-02-29 12:53:08 -08:00
Cosimo Cecchi
5a83787dc0
Update CSS nodes documentation
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
bb55a1a958
scale: add gadgets for indicator/label in scale marks
...
This will allow us to theme them indepdendently, and specify a size for
the indicator from the theme.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
7bd3d87eeb
scale: add a gadget for every mark
...
We want to add another gadget for the mark indicator. This will allow us
to do so.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
74a8bbfd38
Adwaita: add minimum size for marks
...
It's still suboptimal, because there's no way to control the size of the
indicator alone, but this does the job for now.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
0fb50dc9a8
gadget: improve debug message
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
0c8dbf07ce
range: draw slider on top of all contents
...
This is so that e.g. the focus ring is drawn under the slider.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
cdd7a7bdcd
scale: implement rendering for marks gadgets
...
This completes the conversion of scale marks to gadgets.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
1a8eb9fefa
scale: implement size allocate for mark gadgets
...
This allows to move the mark sections around with e.g. margins.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
562a501f3b
scale: port marks size request to gadgets
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
2f420d0e14
scale: use gadgets instead of nodes for mark containers
...
The gadget is not yet allocated though.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
b73d274d55
scale: rename function arguments
...
To make them clearer. No functional change here.
2016-02-29 10:45:14 -08:00
Cosimo Cecchi
8d5d16ae56
scale: remove unused argument
...
It's always GTK_POS_TOP.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
bc41ff8af4
range: better hack for GtkColorScale
...
Just draw the slider, since that is the only thing GtkColorScale cares
about.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
887b6d65a1
range: deprecate gtk_range_get/set_min_slider_size()
...
Nothing uses these functions inside GTK anymore.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
424f17c0fb
range: don't use gtk_range_set_min_slider_size()
...
The way this method is used from the GtkRange subclasses doesn't really
work well when the slider properties change as a consequence of e.g. a
style class being applied (e.g. the fine-tune style class).
In fact, there's no need to read the minimum slider size out of band,
and we can obtain the same result in a way that always work by setting a
private property on GtkRange.
2016-02-29 10:45:13 -08:00
Lapo Calamandrei
0468ff1545
Adwaita: some more WIP theme work for the new scale
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
3ff66edb6b
gadget: simplify code
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
0883ff5eed
range: use border box for slider area
...
Since we can use negative margins, we should not use the margin box
for the slider area. Use the border box instead, since that's what is
typically mapped to the visible area.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6ecab5ee6b
range: use new GtkCssGadget API instead of rolling our own
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
44178c0541
gadget: add API to get various area boxes
...
Compared to the function returning the allocation, these will return the
box in gadget coordinates.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
2d2a81682d
range: simplify code
...
Instead of directly accessing the widget allocation, we can use the
gadget API to test whether the coordinates are in the main gadget.
2016-02-29 10:45:13 -08:00
Lapo Calamandrei
622f5aef4e
Adwaita: WIP for new range theme
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
d1433c25f3
range: add a gadget for the whole widget area
...
This commit introduces another node, called "contents", that holds the
main contents of the range. This allows for the main gadget itself to
span across the whole surface of the widget now.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
a9ea544f3d
scale: always add marks at the beginning or the end
...
Marks are always either the first or the last child of the scale.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
1d047f0097
range: use new GtkBoxGadget API instead of counting children
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6370d6cb27
boxgadget: add APIs to insert gadgets next to siblings
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6401e2405e
range: use new GtkBoxGadget API instead of removing/inserting
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
06776d3d2f
boxgadget: add API to set expand/align flags for gadget child
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
6827bd5e04
range: move slider drawing where it belongs
...
The slider gadget is a child of the trough gadget, so draw it from
there.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
f0d9afd300
scrollbar: deprecate min-slider-length style property
...
In favor of min-height/min-width, like we did for other similar
properties.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
0974b0d843
range: whitespace fix
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
fb11cc1baf
range: remove border allocation hack
...
We can achieve the same result with a negative margin.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
1a116b9a95
colorscale: don't use style properties to determine slider size
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
8b87eca11e
Revert "range: move GtkColorScale special case to GtkColorScale"
...
This reverts commit d93d266ed9e3e26e382a4f6d4b5d4ea19eff3bcf.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
b927fc0874
Revert "range: simplify code"
...
This reverts commit a74f7dcaf8a02c96c6bfecab6969e1d33ecb9332.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
a7099d1468
range: simplify code
...
Now that everything is in the main gadget, we can just let it propagate
drawing to its children.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
b6f0b6be87
range: move GtkColorScale special case to GtkColorScale
...
Now we can just tweak the node visibility for it.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
cbbe237c18
range: remove special case that's not needed
...
We already set the gadget not to be visible in that case.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
ddb863e523
range: move slider inside the trough
...
This will require a rewrite of most of the theme, but it's the right
thing to do.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
d1c5ecfaef
scale: deprecate slider-length style property
...
This can be achieved using min-height/min-width CSS properties now.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
c1eff2cce5
range: deprecate more style properties
...
These are never read now.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
413b9d5b3c
range: continue porting to GtkGadgets
...
This commit rewrites a lot of the GtkRange internals to make full use
of the gadget structure.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
e9fe46ea5f
gadget: add hit test functions
...
These will be useful in later commits.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
8c43b3ee60
range: remove unused code
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
6c19947859
range: remove call that is not needed
...
gtk_range_calc_slider() already calls the same function when needed.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
83a6471c4e
range: simplify code a bit
2016-02-29 10:45:11 -08:00
Cosimo Cecchi
d19215015e
range: don't call gtk_range_calc_layout() in realize()
...
This should not be needed, and we want to get rid of
gtk_range_calc_layout().
2016-02-29 10:45:11 -08:00
Cosimo Cecchi
1f9de3cfec
range: deprecate arrow-scaling style property
...
This can be done with CSS now.
2016-02-29 10:45:11 -08:00
Cosimo Cecchi
3b37f2a42a
range: use newer GtkCssGadget API
2016-02-29 10:45:11 -08:00