use palette shades

This commit is contained in:
0xMRTT 2022-08-11 14:22:08 +02:00
parent 96b1c98565
commit 9aae287cb0
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB
2 changed files with 12 additions and 1 deletions

View file

@ -26,6 +26,7 @@ from anyascii import anyascii
import gi
from gi.repository import Gtk, Gdk, Gio, Adw, GLib, Xdp, XdpGtk4
from material_color_utilities_python import *
from .settings_schema import settings_schema
from .window import AdwcustomizerMainWindow
@ -207,7 +208,15 @@ class AdwcustomizerApplication(Adw.Application):
self.reload_variables()
def update_theme_from_monet(self, theme, tone):
pass
palettes = theme["palettes"]
palette = {}
i = 0
for color in palettes.values():
i += 1
palette[str(i)] = hexFromArgb(color.tone(tone))
self.pref_palette_shades["monet"].update_shades()
def generate_gtk_css(self, app_type):
final_css = ""

View file

@ -122,6 +122,8 @@ class AdwcustomizerMainWindow(Adw.ApplicationWindow):
self.monet_palette_shades = AdwcustomizerPaletteShades("monet",
"Monet Palette",
6)
self.get_application(
).pref_palette_shades["monet"] = self.monet_palette_shades
self.monet_pref_group.add(self.monet_palette_shades)
self.tone_row = Adw.ComboRow()