mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Hack a way to have the white logo in AboutSlint on too dark background
This commit is contained in:
parent
03f78af987
commit
530a78ba54
1 changed files with 5 additions and 2 deletions
|
@ -86,14 +86,17 @@ export AboutSlint := Rectangle {
|
|||
padding: 12px;
|
||||
spacing: 8px;
|
||||
alignment: start;
|
||||
Text {
|
||||
t := Text {
|
||||
text: "Made with";
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
Image {
|
||||
source: @image-url("slint-logo-black.svg");
|
||||
// Hack: try to guess if we should have the logo in black or in white depending in the default text color
|
||||
// If when we make it much brighter it saturates to white, consider the white logo
|
||||
property <color> t_color: t.color;
|
||||
source: t_color.brighter(100%) == Colors.white ? @image-url("slint-logo-white.svg") : @image-url("slint-logo-black.svg");
|
||||
preferred-width: 256px;
|
||||
}
|
||||
Text {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue