-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Hi!
When using a custom dark theme (not based on yaru's default light/dark surface colors), the YaruWindowTitleBar does not pick up my theme's color for the focused background. Instead, it always uses the hardcoded YaruColors.titleBarDark or YaruColors.titleBarLight.
See here:
yaru.dart/lib/src/widgets/yaru_title_bar.dart
Lines 177 to 182 in 6d7a650
final defaultBackgroundColor = WidgetStateProperty.resolveWith((states) { | |
if (!states.contains(WidgetState.focused)) { | |
return theme.colorScheme.surface; | |
} | |
return light ? YaruColors.titleBarLight : YaruColors.titleBarDark; | |
}); |
Is this intended? If not, could the title bar be adjusted to use the current ThemeData by default, so it works better with custom color themes?
I also noticed that when setting the backgroundColor property on YaruWindowTitleBar, it does override the internal focus logic and applies the same color for both the focused and the unfocused states. It would be nice if there were a way to provide different colors for both states, or for the widget to use the theme’s color scheme by default.
This would make it so much easier to integrate with custom themes.
Thanks! :)