Hi,
I've attached a demo application -- could someone explain to me how I get the Glow button captions the same size as the toolbar button captions.
They're all supposed to be 9pt Segoe UI... but the glow button font size is noticably smaller. (Create and Selected toolbars are Glow Buttons)
Thanks
Stuart
Ribbon_GlowButton_Font_Size.zip (1.2 MB)
Try to set AdvToolBarOfficeStyler.GlowButtonAppearance.SystemFont = false
Hi,
Thanks, but still too small.
There must be more to this then, as I cannot see this here.
This was tested on Delphi 12.2, Win11, TMS VCL UI Pack v13.5
I guess there must be - but I cannot think what?
In that demo application - where should I change the font size for glow buttons?
Via ToolBarStyler.Font when ToolBarStyler.GlowButtonAppearance.SystemFont = false
1 Like
Hi Bruno,
Setting ToolbarStyler.Font
at designtime changed nothing at runtime (or designtime) with ToolBarStyler.GlowButtonAppearance.SystemFont = false
.
I changed ToolbarStyler.Font.Size
at runtime in TForm.AfterConstruction and that didn't work either. ( TAdvToolBarOfficeStyler(Ribbon.ToolBarStyler).Font.Size := MulDiv(9, Screen.PixelsPerInch, 96);
)
I inspect the font of a TAdvGlowButton at runtime, and it reports "Tahoma, 8pt"
The only thing that's worked is setting each TAdvGlowButton.Font property directly in a loop after construction. And I have to scale the font size manually too, like this:
for C in Self do
if C is TAdvGlowButton then
begin
TAdvGlowButton(C).Font.Assign(self.Font);
TAdvGlowButton(C).Font.Size := MulDiv(9, Screen.PixelsPerInch, 96);
end;
Let me know if you need any more info?
Stuart
I adapted your app to allow for each individual button's font to be customized.
Project173_RIBBON.zip (1.2 MB)
Hi Bruno,
This is what your adjusted project looks like at Design and RunTime here:
1 - I see the font size is still smaller at runtime. I'm running in a VM with 125% scaling here.
2 - I need to use the Office 2019 White style - and when I do it sets the font to Segoe UI and it seems it cannot be changed at the ToolbarStyler.Font - only on each glow button.
Best regards,
Wrt font size, I still don't know what Delphi IDE you use, what your form designer DPI setting is, what your screen DPI setting is, ...
Office uses Segoe UI, hence it forces the font to be Segoe UI when you select an Office specific style.
Hi,
Delphi 10.4
Designer = 96 Pixels Per Inch
Screen = 120 Pixels Per Inch
Noted : re the Office 2019 font name. I'm okay with Segoe UI anyway :) The font size difference between design/runtime is the primary concern.
Thanks
Stuart