From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 90F3095307 for ; Fri, 12 Apr 2024 10:05:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 60EF955AE for ; Fri, 12 Apr 2024 10:05:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 12 Apr 2024 10:05:00 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1762544F3A for ; Fri, 12 Apr 2024 10:05:00 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 12 Apr 2024 10:04:53 +0200 Message-Id: <20240412080458.1066580-5-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412080458.1066580-1-d.csapak@proxmox.com> References: <20240412080458.1066580-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.136 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_2 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_4 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve-flutter-frontend 4/9] adapt to material 3 changes for themes X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2024 08:05:33 -0000 it's recommended to use fromSeed with what was the primary color beforehand. With this, all colors are correctly deduced from it (e.g. outline colors etc.). But since we then set primaryContainer, we also have to set onPrimaryContainer, otherwise it's deduced from the original primaryContainer color that would have been generated. this fixes the issue of the overly stark contrast of the divider color (which uses the outline color). Signed-off-by: Dominik Csapak --- lib/main.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 5d49af7..4a56435 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -97,11 +97,13 @@ class MyApp extends StatelessWidget { title: 'Proxmox', //themeMode: ThemeMode.dark, // comment in/out to test theme: ThemeData( - colorScheme: const ColorScheme.light( + colorScheme: ColorScheme.fromSeed( + seedColor: ProxmoxColors.supportBlue, brightness: Brightness.light, primary: ProxmoxColors.supportBlue, onPrimary: Colors.white, primaryContainer: ProxmoxColors.blue900, + onPrimaryContainer: ProxmoxColors.blue50, secondary: ProxmoxColors.orange, secondaryContainer: ProxmoxColors.supportLightOrange, surface: ProxmoxColors.supportGreyTint50, @@ -134,11 +136,13 @@ class MyApp extends StatelessWidget { ), ), darkTheme: ThemeData( - colorScheme: const ColorScheme.dark( + colorScheme: ColorScheme.fromSeed( + seedColor: ProxmoxColors.supportBlue, brightness: Brightness.dark, primary: ProxmoxColors.supportBlue, onPrimary: Colors.white, primaryContainer: ProxmoxColors.blue800, + onPrimaryContainer: ProxmoxColors.blue50, surface: ProxmoxColors.greyTint20, onSurface: Colors.white, secondary: ProxmoxColors.orange, -- 2.39.2