FLTK logo

Re: [fltk.general] FLTK 1.4 Menu Bar Style

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.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: FLTK 1.4 Menu Bar Style "'Albrecht Schlosser' via fltk.general" 15:28 May 06  
  On 5/6/24 04:09 Daniel Harding wrote:
In FLTK 1.4, "highlighted" menu bar items (and submenu items) are indicated
with either an up box or a light background:

[image: 1.png]

I much prefer the stronger contrast of using the FL_SELECTION_COLOR in FLTK
1.3:

[image: 2.png]

I took a look at Fl_Menu_Item::draw() in Fl_Menu.cxx but it didn't seem
clear how to customize a Fl_Menu_Bar to get the same effect.

Using test/editor.cxx as an example, I can add
app_menu_bar->box(FL_FLAT_BOX); to replace the up box with a flat box, but
I can't figure out how to always use FL_SELECTION_COLOR as the selected
background color. (app_menu_bar->selection_color(FL_SELECTION_COLOR); as no
affect and app_menu_bar->color(FL_SELECTION_COLOR); makes every
non-selected menu item use the selection color.)

It's always difficult to reply to two different issues in one post. I'll reply to this part later to Manolo's comment.

I also think the new style of the submenu arrows is a bit exaggerated:

[image: 4.png]

And I think the more modest look of FLTK 1.3 arrows was more appropriate:

[image: 3.png]

I agree that the new arrows look a bit too large in your screenshots. For digging deeper into details please tell us which 1.3.x version you are using, just in case this changed during 1.3.x development.

There are also differences per FLTK scheme, so please tell us also which scheme you used for your tests.

Is it possible to customize this?

This is not customizable by FLTK users (developers of applications *using* FLTK). However, I think it would be appropriate to limit the size of the arrows to a certain maximum to be more compatible to 1.3.x.

I'm working on a modification, but please answer my questions above nevertheless. This would be very helpful.

One important notice: the new "arrow drawing" functions in FLTK 1.4 standardize the arrow drawing for all widgets and menus and whatever. The old code in 1.3 used "manual" arrow drawing functions "everywhere" which resulted in a different look of arrows (mostly a kind of triangles, but the GTK+ scheme is a little different) in different widgets and menus. The new "oxy" scheme in 1.4 added even more to the complexity.

The new 1.4 arrow drawing functions unify this. Such "arrows" are now looking the same in all widgets and menus but can be different *per scheme* (as said before, "gtk+" is different than the "base" scheme but also different than the "oxy" scheme).

That said, it must be obvious that some of the "hand made" arrow drawing functions produced different results in 1.3 than the new drawing functions in 1.4. This is neither a bug nor a regression - it's a feature. ... Unless something went awry in the transition from 1.3 arrow drawing to 1.4. arrow drawing in general.

The submenu arrows appear to be such a case which is why I'm investigting this. Thanks for your report.

Thanks for any advice.

I'm not sure if there's anything you can do yourself. Reporting the issue was a first good step, I appreciate this very much.

(Don't forget to answer my questions above)

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/498bffff-f572-4b7a-bf58-4b456f32eab5%40aljus.de.
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'.