Moved background paint setting tomanager; fixed reference

This commit is contained in:
itdominator 2023-09-25 23:22:47 -05:00
parent fd282a6595
commit 8046fec794
3 changed files with 7 additions and 4 deletions

View File

@ -82,7 +82,7 @@ class Window(Gtk.ApplicationWindow):
styleContext.add_provider_for_screen(screen, cssProvider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
def _area_draw(self, widget: Gtk.ApplicationWindow, cr: cairo.Context) -> None:
cr.set_source_rgba(0, 0, 0, 0.54)
cr.set_source_rgba( *settings_manager.get_paint_bg_color() )
cr.set_operator(cairo.OPERATOR_SOURCE)
cr.paint()
cr.set_operator(cairo.OPERATOR_OVER)

View File

@ -68,7 +68,7 @@ class IPCServer(Singleton):
def _handle_ipc_message(self, conn, start_time) -> None:
while True:
msg = conn.recv()
if settings.is_debug():
if settings_manager.is_debug():
print(msg)
if "FILE|" in msg:

View File

@ -92,6 +92,7 @@ class SettingsManager(StartCheckMixin, Singleton):
self._main_window_w = 1670
self._main_window_h = 830
self._builder = None
self.PAINT_BG_COLOR = (0, 0, 0, 0.0)
self._trace_debug = False
self._debug = False
@ -127,6 +128,8 @@ class SettingsManager(StartCheckMixin, Singleton):
def get_main_window_width(self) -> Gtk.ApplicationWindow: return self._main_window_w
def get_main_window_height(self) -> Gtk.ApplicationWindow: return self._main_window_h
def get_builder(self) -> Gtk.Builder: return self._builder
def get_paint_bg_color(self) -> list: return self.PAINT_BG_COLOR
def get_glade_file(self) -> str: return self._GLADE_FILE
def get_icon_theme(self) -> str: return self._ICON_THEME
def get_css_file(self) -> str: return self._CSS_FILE