View Issue Details

IDProjectCategoryView StatusLast Update
0036435LazarusWidgetsetpublic2019-12-14 15:00
ReporterChris RordenAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformIntel 4770kOSUbuntuOS Version19.10
Product Version2.1 (SVN)Product Build62382 
Target VersionFixed in Version 
Summary0036435: GTK3" TTrackBar TickStyle tsNone still shows numeric label
DescriptionUnlike Windows, GTK2, QT5, Cocoa and Carbon, setting the TrackBar TiickStyle to tsNone still shows a number indicator for track position. This breaks cross platform programs (e.g. MRIcroGL, Surfice) that use this style to conserve screen real estate.
Steps To ReproduceAdd TrackBar to project, set TIckStyle to tsNone, set Widgetset to GTK3, run
TagsNo tags attached.
Fixed in Revision62385
LazTarget-
WidgetsetGTK 3
Attached Files
  • tickStyle.zip (109,119 bytes)
  • tickstyle.png (5,245 bytes)
    tickstyle.png (5,245 bytes)
  • tick.diff (428 bytes)
    Index: lcl/interfaces/gtk3/gtk3widgets.pas
    ===================================================================
    --- lcl/interfaces/gtk3/gtk3widgets.pas	(revision 62382)
    +++ lcl/interfaces/gtk3/gtk3widgets.pas	(working copy)
    @@ -3600,6 +3600,7 @@
     begin
       if IsWidgetOK then
       begin
    +    PGtkScale(FWidget)^.set_draw_value(ATickStyle <> tsNone);
         if ATickStyle = tsNone then
           PGtkScale(FWidget)^.clear_marks
         else
    
    tick.diff (428 bytes)

Activities

Chris Rorden

2019-12-13 19:20

reporter  

tickStyle.zip (109,119 bytes)

Chris Rorden

2019-12-13 19:21

reporter  

tickstyle.png (5,245 bytes)
tickstyle.png (5,245 bytes)

CudaText man

2019-12-13 22:08

reporter   ~0119826

try the fix, is it enough?

tick.diff (428 bytes)
Index: lcl/interfaces/gtk3/gtk3widgets.pas
===================================================================
--- lcl/interfaces/gtk3/gtk3widgets.pas	(revision 62382)
+++ lcl/interfaces/gtk3/gtk3widgets.pas	(working copy)
@@ -3600,6 +3600,7 @@
 begin
   if IsWidgetOK then
   begin
+    PGtkScale(FWidget)^.set_draw_value(ATickStyle <> tsNone);
     if ATickStyle = tsNone then
       PGtkScale(FWidget)^.clear_marks
     else
tick.diff (428 bytes)

Chris Rorden

2019-12-14 13:53

reporter   ~0119840

@CudaText man - your solution works perfectly. If this can be added to trunk we can close this issue. Thanks for your quick work.

Zeljan Rikalo

2019-12-14 14:19

developer   ~0119841

Please test and close if ok.

Issue History

Date Modified Username Field Change
2019-12-13 19:20 Chris Rorden New Issue
2019-12-13 19:20 Chris Rorden File Added: tickStyle.zip
2019-12-13 19:21 Chris Rorden File Added: tickstyle.png
2019-12-13 22:08 CudaText man File Added: tick.diff
2019-12-13 22:08 CudaText man Note Added: 0119826
2019-12-14 13:53 Chris Rorden Note Added: 0119840
2019-12-14 14:19 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-12-14 14:19 Zeljan Rikalo Status new => resolved
2019-12-14 14:19 Zeljan Rikalo Resolution open => fixed
2019-12-14 14:19 Zeljan Rikalo Fixed in Revision => 62385
2019-12-14 14:19 Zeljan Rikalo LazTarget => -
2019-12-14 14:19 Zeljan Rikalo Widgetset GTK 3 => GTK 3
2019-12-14 14:19 Zeljan Rikalo Note Added: 0119841
2019-12-14 15:00 Chris Rorden Status resolved => closed