Open ghmart opened 7 months ago
ColorPicker uses a lot of internal nodes such as Labels and LineEdits, so the font size in ColorPicker is governed by the font size theme items you assigned for these classes in your Theme resource.
I don't think the font size should be controlled separately for a single control in a manner that is different from all other controls. It sounds like you may be looking for theme type overrides, which allow defining specific reusable overrides across nodes (for instance, a button that has a "primary" appearance).
default font size dynamically changed by user (e.g. Ctrl + mouse wheel).
Does this affect the entire app? This sounds strange to do with a simple Ctrl + mouse wheel action. Most apps that offer a zoom feature only zoom on the main "canvas" so to speak (see code editors, web browsers, etc). They don't zoom the entire UI unless you go through the settings and change the display scale option (when that option exists).
Thank you for your attention to this, Calinou!
Theme override for ColorPicker is exactly what I was seeking from the beginning. But it doesn't have "font" and "font size" to override. That's the problem.
Generally, changing theme's default font size appears to be an excellent way to scale UI. All the affected controls rearranged nicely. But ColorPicker becomes very big.
Does this affect the entire app?
It can be whole GUI, or particular control hierarchy inside it. For example, Ctrl + mouse wheel for scaling whole application and Ctrl + Shift + mouse wheel for scaling subwindow under mouse cursor. In my project it is subwindow containing tree of elements and ColorPicker below. Tree should react to scale, but not ColorPicker.
Like in Blender you have global "Resolution scale" in preferences, and at the same time you can Ctrl + MMB + mouse move while hovering Properties Editor to dynamically scale its contents only.
I had hoped that maybe this is just a missing properties, but if things are so complicated, of course, I can live with the current ColorPicker.
Describe the project you are working on
Drawing application with custom GUI theme, default font size dynamically changed by user (e.g. Ctrl + mouse wheel).
Describe the problem or limitation you are having in your project
Increasing parent control's theme default font size makes ColorPicker too big on the screen.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Separate control over font size of ColorPicker is needed. This will prevent ColorPicker from taking too big area on the screen.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Adding "Font size" property to ColorPicker's theme.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This can't be worked around by script.
Separate theme can be created for ColorPicker, then this theme's "Default font size" can be used. With all propagating sequences, e.g. all its children needs manual attachment of main theme.
Is there a reason why this should be core and not an add-on in the asset library?
Too simple and natural feature to have dedicated add-on or custom class if any.