Comments (5)
Setting minimum height with client property JComponent.minimumHeight
(or FlatClientProperties.MINIMUM_HEIGHT
) is now implemented in master branch.
Do you think that a global value in the UI defaults is also necessary/useful?
from flatlaf.
I don't think it is necessary, and I don't know if it could be useful. Because underline is not the default style for a button, it requires code to activate it, so if someone wants a different height, they could make a factory method.
from flatlaf.
I just tried the code, but I would have thought the preferred size is the one that needs attention. How would you change my test case so that the button is taller (that means having the underline lower)?
from flatlaf.
Must admit that I've not tested the change with your code.
It does not work in your example because the JToggleButton is a child of a JToolBar and such children do not get "minimum preferred" width/height.
FlatLaf/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java
Lines 387 to 391 in 74909da
The purpose of the "minimum preferred" width is that buttons with short text (e.g. "OK") or empty text fields have a useful width by default. If a button is in a toolbar, it should be smaller.
Anyway there is a better way to give the button a larger size:
button1.setMargin( new Insets( 10, 10, 10, 10 ) );
from flatlaf.
implemented in 0.26
from flatlaf.
Related Issues (20)
- Question on customizing IntelliJ theme through properties file HOT 4
- Add Hostname to Title Bar when X11 Forwarding HOT 10
- 3.4 - JVM crash on macOS HOT 5
- Global menu for Linux distros HOT 5
- Wrap FileChooser's shortcuts panel in vertical scroll pane
- Embedded binaries are not signed on macOS HOT 1
- Random JProgressBar exceptions HOT 5
- Request: JSplitPane.expandableSide "none" property HOT 5
- ToolTip is refreshing multiple times when cursor is moving HOT 5
- ScrollBar for JList not working HOT 1
- Illegal Reflective Access when using JFileChooser HOT 1
- Unable to get table header seperator line. HOT 2
- Appear a red square icon when using FlatImageIcon HOT 1
- How to set the TitleBar height on macOS in AWT? HOT 2
- Laf animation HOT 2
- Rounded Panel clipping image HOT 3
- progress bar error HOT 4
- JLabel with rounded border corners and background HOT 1
- Text Modifies System Font Size Even When Font Size Specified
- feature: Table.selectionArc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flatlaf.