Skip to content

Commit

Permalink
Fix terminal styling for create subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
coffandro authored and kbdharun committed Jul 3, 2024
1 parent 64e82dd commit 6a5605e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apx_gui/windows/create_subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def __build_ui(self) -> None:
self.__terminal.set_input_enabled(False)

def __on_setup_terminal_colors(self, *args):

is_dark: bool = self.__style_manager.get_dark()

palette = [
"#363636",
"#c01c28",
Expand Down Expand Up @@ -113,8 +116,12 @@ def __on_setup_terminal_colors(self, *args):
self.colors = [Gdk.RGBA() for c in palette]
[color.parse(s) for (color, s) in zip(self.colors, palette)]

self.fg.parse(FOREGROUND)
self.bg.parse(BACKGROUND)
if is_dark:
self.fg.parse(FOREGROUND_DARK)
self.bg.parse(BACKGROUND_DARK)
else:
self.fg.parse(FOREGROUND)
self.bg.parse(BACKGROUND)

self.__terminal.set_colors(self.fg, self.bg, self.colors)

Expand Down
1 change: 1 addition & 0 deletions apx_gui/windows/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class ApxGUIWindow(Adw.ApplicationWindow):
content: Adw.Bin = Gtk.Template.Child() # pyright: ignore
tab_bar: Adw.TabBar = Gtk.Template.Child() # pyright: ignore
title: Adw.WindowTitle = Gtk.Template.Child() # pyright: ignore
style_manager = Adw.StyleManager().get_default() # pyright: ignore

def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
Expand Down

0 comments on commit 6a5605e

Please sign in to comment.