Hi friends.
Many thanks for your words
A little brief about Menu and related font problem/request.
Code: Select all
WITH OBJECT MainMenu():New( "MainMenu" )
WITH OBJECT MenuPopup():New( 'File',, 'File' )
WITH OBJECT MenuItem():New( 'ItemOpen' ,, 'Open' , { || MsgInfo( 'Open' ) } ); END WITH
END WITH
END WITH
In the previous code, the MainMenu object inherit font (size, name, etc.) from QT default.
Code: Select all
WITH OBJECT MainMenu():New( "MainMenu" )
:FontSize := 16
WITH OBJECT MenuPopup():New( 'File',, 'File' )
WITH OBJECT MenuItem():New( 'ItemOpen' ,, 'Open' , { || MsgInfo( 'Open' ) } ); END WITH
END WITH
END WITH
In the previous code, we have changed the fontsize property for the MainMenu object.
MenuItem inherit font (size, name, etc.) from its parent. Who is its parent? MainMenu
So, with first example MenuItem inherit Qt default font, in the second one inherit a "changed" font.
There are 3 lines within MenuPopUp.prg (97-100): if I remove these lines, menuitem doesn't inherit font property from its parent, but what happens? If I set a font for the MainMenu, this font it is not propagate to the MenuItem (in other words, it has default font) and we must use :FontSize to align its fontsize.
Remember that all font* methods are used by many objects.
From one side we can use only one time :FontSize and all menu objects have the same size; on the other side, we can have different size, but we must use everywhere :FontSize to have the same size.
I think this can be an evolution and everyone can think a solution.
Cheers