`GtkRange` with `Adjustment:page-size` <> 0 causes highlight to be drawn to wrong position / behind slider value
I know :page-size
is probably not hugely relevant for GtkScale
, but it does introduce a drawing difference between GTK3 and GTK4, in case that indicates something larger needing fixed - which I guess it does, since the snapshot code drawing the highlight lives in GtkRange
.
If a Scale has page-size set, that causes the usable/slider range to be decreased towards the max, by the page-size. Strange, but OK!
In GTK4 though, this also causes the highlight that gets drawn to lag behind the slider handle by an amount proportional to the value (not constant).
I guess this should work the same in both versions, even if it is a bit weird/pointless for GtkScale
; it might be relevant for other GtkRange
subclasses.
Test UI file:
<interface>
<object class="GtkAdjustment" id="adjustment">
<property name="lower">0</property>
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">19</property>
<property name="page-size">25</property>
<property name="value">50</property>
</object>
<object class="GtkWindow">
<child>
<object class="GtkScale">
<property name="visible">true</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="adjustment">adjustment</property>
</object>
</child>
</object>
</interface>
Edited by Daniel Boles