-
Notifications
You must be signed in to change notification settings - Fork 40
fix!: set buttons and textfields to be 35px high #370
Conversation
you can control both the size and the content padding for the child inside |
Also the example s*cks because the rows try to force a specific height I'll rework the example a bit Do you have a specific time pressure on this issue? I don't know if I can finish it today |
There's no time pressure. I just noticed some mismatching button heights (36px vs. 40px) in the installer and started wondering what was going on and where the 36px even came from... |
ok :) |
Okay slowly getting there, though it is a bit more complicated because many things affect the text field @jpnurmi Things that need changing for this:
Things that can still totally ruin the textfields:
I must admit this already looks much better. But can we live with the hint bouncing and the prefix icon alignment? |
@jpnurmi okay this is really weird I found most of the things to be controllable inside the textfield, except the actual editable text ... What we could do is to keep those changes here because they overall look better with buttons and textfields being smaller what do you suggest in general and what should be the scope of this PR? |
It's painful to wrap something like |
Alternative would be to expose a kYaruTextFieldFontSize = 14.0 in yaru.dart and just remember us every time we use a text field to use this constant? or good ol inheritance? import 'package:flutter/material.dart';
class YaruTextField extends TextField {
const YaruTextField({super.key});
@override
StrutStyle? get strutStyle => ...;
@override
TextStyle? get style {
return const TextStyle(fontSize: 14);
}
} |
I tested this a little more and maybe we could come back to your old idea of using the VisualDensity API ? @jpnurmi |
Or just go with the flow and accept 40px buttons 😭 |
Maybe we can have both. Even the current button height is too low for the weird mobile aspect ratio. Just open yaru.dart GitHub website on mobile. |
playing around with a vanilla material3 theme and visual density. edit: also the font and icon sizes are often way too large |
This is setting the height for buttons and togglebuttons to 35
The matching icon size seems to be 16 🤷
I adapted the example (the control view really needs some love to reduce code copy pasting at some point)
Fixes #369