From cf4a23135f9e16c05a31673ca982b2c02c745dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 14 Sep 2026 11:59:29 -0700 Subject: [PATCH] KeyboardIcon.css: update for GTK 4.20 --- data/KeyboardIcon.css | 57 +++++++++++++++++++++++-------------------- meson.build | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/data/KeyboardIcon.css b/data/KeyboardIcon.css index 83f86793..dd9a0c39 100644 --- a/data/KeyboardIcon.css +++ b/data/KeyboardIcon.css @@ -1,36 +1,39 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 2 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright 2019-2026 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-2.0-or-later + */ .keyboard-icon { - background-color: #fff; - border-radius: 2px; - box-shadow: - 0 0 2px alpha (#000, 0.3), - 0 1px 2px alpha (#000, 0.6); - color: #333; + background-color: color-mix(in srgb, black 65%, transparent); + color: white; + border-radius: 0.3rem; font-weight: 600; - padding: 0 3px; text-shadow: none; + } -.panel.color-light .keyboard-icon { - background-color: alpha (#000, 0.65); +panel.color-light .keyboard-icon { + box-shadow: + 0 0 2px color-mix(in srgb, white 30%, transparent), + 0 1px 0 color-mix(in srgb, white 25%, transparent); +} + +panel.color-dark .keyboard-icon, +panel.maximized .keyboard-icon { + background-color: white; + color: #333; box-shadow: - 0 0 2px alpha (#fff, 0.3), - 0 1px 0 alpha (#fff, 0.25); - color: #fff; + 0 0 2px color-mix(in srgb, black 30%, transparent), + 0 1px 2px color-mix(in srgb, black 60%, transparent); +} + + +panel.translucent.color-dark .keyboard-icon { + box-shadow: + 0 0 2px color-mix(in srgb, black 15%, transparent), + 0 1px 2px color-mix(in srgb, black 30%, transparent); +} + +panel.translucent.color-light .keyboard-icon { + box-shadow: none; } diff --git a/meson.build b/meson.build index d574c05a..20cd1cf7 100644 --- a/meson.build +++ b/meson.build @@ -54,7 +54,7 @@ shared_module( dependency('glib-2.0'), dependency('gobject-2.0'), dependency('granite-7', version: '>= 7.6.0'), - dependency('gtk4'), + dependency('gtk4', version: '>= 4.20'), dependency('libxml-2.0'), wingpanel_dep, ibus_dep,