mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-07-08 03:57:48 +00:00
use palette shades
This commit is contained in:
parent
96b1c98565
commit
9aae287cb0
11
src/main.py
11
src/main.py
|
@ -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 = ""
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue