FLTK logo

[fltk/fltk] possible incoherence in FL_Tree_Item drawing (Issue #298)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] possible incoherence in FL_Tree_Item drawing (Issue #298) AshfordN Nov 27, 2021  
 

When overriding the FL_Tree_Item::draw_item_contents() method, the expectation (at least from my perspective) is that the returned value would be upheld in future computations. In particular, I expected the assigned widget to be placed at some offset from this value. However: the placement of the widget is independently computed on line 1083, against the label's width; and, while the result of draw_item_contents() is stored in xmax on line 1138, it is overwritten on line 1146, as long as a widget is set. This means that the result of draw_item_contents() is completely ignored as long as the FL_Tree_Item has an assigned widget. I'm not sure if this is the intended behavior, but it seems somewhat incoherent and counter-intuitive.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.