In this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. 80pix?
Mailing lists / lazarus / 2017-02
IDE Component-dialog: small button
8 messages · 5 people ·
- OOndrej Pokorny 3
- CC Western 2
- AAlexey 1
- UUnknown author 1
- VVojtěch Čihák 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Alexey wroteIn this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. 80pix?
ummm, it looks plenty big enough... all of the letters show with no clipping on either side... what am i missing??
wkitty42--- wrote 8 lines
It looks like a button that has been autosized; I must admit my feeling is that autosized buttons should have a minimum width, something like the width of a "Cancel" button, say. The general GUI convention seems to be to have all buttons of similar sizes, and the lazarus autosize algorithm produces buttons that can often look on the small side compared to most programs. Turning off autosizing is a bad idea because of the variety of system fonts.
Colin
ummm, it looks plenty big enough... all of the letters show with no clipping on either…
wkitty42--- wrote 7 lines
You don't miss anything. The button is just OK.
Ondrej
It looks like a button that has been autosized; I must admit my feeling is that autosized…
C Western wroteIt looks like a button that has been autosized; I must admit my feeling is that autosized buttons should have a minimum width
You can use the Constraints property to set the minimum width in your own programs.
Ondrej
Ondrej Pokorny wrote 7 lines
Indeed, though this minimum width should also depend on the font size, so requires some programming on each form (though maybe a single fixed value would work in most cases).
Colin
C Western wroteIndeed, though this minimum width should also depend on the font size, so requires some programming on each form (though maybe a single fixed value would work in most cases).
Constraints are scaled according to current DPI settings in Lazarus 1.7+ (with high DPI enabled).
If you change the Font.Size property it's your own responsibility to assign a valid value to Constraints.
Ondrej
ummm, it looks plenty big enough... all of the letters show with no clipping on either…
AFAIK in Lazarus dialogs is often used component TButtonPanel (Misc palette) with OK, Cancel, Close and Help buttons. These buttons are autosized with Constraints.MinWidth:=DefButtonSize.cx; (this value is taken from Themes: DefButtonSize := ThemeServices.GetDetailSize(Details); it is 75 on Qt).
V.
