From: sbkelley Date: Wed, 3 Dec 2025 03:30:17 +0000 (-0500) Subject: Temporarily-re-clutter layout.tcss for dev X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=a49eebb0d31f42bfe193c8b8d8dce3c6a46807a2;p=obs-ctl Temporarily-re-clutter layout.tcss for dev --- diff --git a/src/obs_ctl/app.py b/src/obs_ctl/app.py index 7788982..d6ff1e3 100644 --- a/src/obs_ctl/app.py +++ b/src/obs_ctl/app.py @@ -21,11 +21,10 @@ class OBSCtlApp(App): yield Footer() yield obs.API(1, id="api") logger.debug("Composing OBSCtlApp") - with ScrollableContainer(id="content_container"): - with Horizontal(id="blocks_h_container1", classes="blocks_h_containers"): - yield RecordControls(id="record_controls") - yield SettingsBlock(id="settings_container") - yield StatsDisplay(id="stats_display") + with Horizontal(id="top_block", classes="block"): + yield RecordControls(id="record_controls", classes="section") + yield SettingsBlock(id="settings_container", classes="section") + yield StatsDisplay(id="stats_display", classes="section") @on(obs.API.Report, "#api") diff --git a/src/obs_ctl/data/layout.tcss b/src/obs_ctl/data/layout.tcss index 63b5bad..7e0bb14 100644 --- a/src/obs_ctl/data/layout.tcss +++ b/src/obs_ctl/data/layout.tcss @@ -1,23 +1,67 @@ #top_block { - min-height:10; -} + RecordControls { + Grid { + grid-size:2; + grid-rows:5; + min-height:10; + } + .bool_control--light { + background:$panel; + text-align:center; + align:center bottom; + } + .bool_control--true_button { + width:1fr; + # height:1fr; + } + .bool_control--false_button { + width:1fr; + # height:1fr; + } + .record_controls--output_control { + background:$surface; + border:blank; + } -BoolControl { - background:$surface; - border:blank; + .record_controls--obsws_control { + background:$background; + border:solid $primary; + } + } + SettingsBlock { + OBSSettings { + .obssettingspane--input { + width:1fr; + } + Grid { + grid-size:2 1; + grid-columns:21 1fr; + Label { + width:1fr; + text-align:right; + padding-right:1; + } + } + } + } } StatsDisplay { - height:8; -} - -TextReadout { - border:solid $primary; - .text_readout--label { - height:1; - align:center middle; + Grid { + grid-size:4; + grid-rows:4; + min-height:8; } - .text_readout--text { - align:center middle; + TextReadout { + border:solid $primary; + width:1fr; + background:$surface; + .text_readout--label { + height:1; + align:center middle; + } + .text_readout--text { + align:center middle; + } } -} \ No newline at end of file +} diff --git a/src/obs_ctl/interface/element/bool_control.py b/src/obs_ctl/interface/element/bool_control.py index 776bd70..a07d7fd 100644 --- a/src/obs_ctl/interface/element/bool_control.py +++ b/src/obs_ctl/interface/element/bool_control.py @@ -39,21 +39,21 @@ class BoolControl(Container): """ DEFAULT_CSS = """ - .bool_control--light { - background:$panel; - text-align:center; - align:center bottom; - width:1fr; - height:1; - } - .bool_control--true_button { - width:1fr; - height:1fr; - } - .bool_control--false_button { - width:1fr; - height:1fr; - } + # .bool_control--light { + # background:$panel; + # text-align:center; + # align:center bottom; + # width:1fr; + # height:1; + # } + # .bool_control--true_button { + # width:1fr; + # height:1fr; + # } + # .bool_control--false_button { + # width:1fr; + # height:1fr; + # } """ COMPONENT_CLASSES = { "bool_control--light", diff --git a/src/obs_ctl/interface/element/text_readout.py b/src/obs_ctl/interface/element/text_readout.py index 3039dc8..13826c2 100644 --- a/src/obs_ctl/interface/element/text_readout.py +++ b/src/obs_ctl/interface/element/text_readout.py @@ -16,10 +16,10 @@ class TextReadout(Container): text_readout--text """ DEFAULT_CSS = """ - TextReadout { - width:1fr; - background:$surface; - } + # TextReadout { + # width:1fr; + # background:$surface; + # } """ COMPONENT_CLASSES = { "text_readout--label", diff --git a/src/obs_ctl/interface/molecule/record_controls.py b/src/obs_ctl/interface/molecule/record_controls.py index ccea563..598dcdd 100644 --- a/src/obs_ctl/interface/molecule/record_controls.py +++ b/src/obs_ctl/interface/molecule/record_controls.py @@ -29,11 +29,16 @@ class RecordControls(ScrollableContainer): |OBSWSDisconnected|Posted when obsws_disconnected is set False.||| """ DEFAULT_CSS = """ - Grid { + /*Grid { grid-size:2; grid-rows:5; - } + }*/ """ + COMPONENT_CLASSES = { + "record_controls--control", + "record_controls--output_control", + "record_controls--obsws_control" + } recording: reactive[bool] = reactive(False) paused: reactive[bool] = reactive(False) streaming: reactive[bool] = reactive(False) @@ -57,16 +62,18 @@ class RecordControls(ScrollableContainer): true_label="Connect", false_label="Disconnect", id="obsws_control", + classes = "record_controls--control record_controls--obsws_control" ) - yield BoolControl(False, label="Record", id="record_control") - yield BoolControl(False, label="Stream", id="stream_control") + yield BoolControl(False, label="Record", id="record_control", classes="record_controls--control record_controls--output_control") + yield BoolControl(False, label="Stream", id="stream_control", classes="record_controls--control record_controls--output_control") yield BoolControl( False, label="Pause", true_label="Pause", false_label="Unpause", swap_red=True, - id="pause_control" + id="pause_control", + classes="record_controls--control record_controls--output_control" ) diff --git a/src/obs_ctl/interface/molecule/settings_block/pane/obs_settings.py b/src/obs_ctl/interface/molecule/settings_block/pane/obs_settings.py index da897b9..6bd6bc5 100644 --- a/src/obs_ctl/interface/molecule/settings_block/pane/obs_settings.py +++ b/src/obs_ctl/interface/molecule/settings_block/pane/obs_settings.py @@ -9,18 +9,18 @@ logger = getLogger(__name__) class OBSSettings(TabPane): DEFAULT_CSS = """ - .obssettingspane--input { - width:1fr; - } - Grid { - grid-size:2 1; - grid-columns:21 1fr; - Label { - width:1fr; - text-align:right; - padding-right:1; - } - } + # .obssettingspane--input { + # width:1fr; + # } + # Grid { + # grid-size:2 1; + # grid-columns:21 1fr; + # Label { + # width:1fr; + # text-align:right; + # padding-right:1; + # } + # } """ COMPONENT_CLASSES = { "obssettingspane--input", diff --git a/src/obs_ctl/interface/molecule/stats_display.py b/src/obs_ctl/interface/molecule/stats_display.py index 5416b2b..de80ec1 100644 --- a/src/obs_ctl/interface/molecule/stats_display.py +++ b/src/obs_ctl/interface/molecule/stats_display.py @@ -18,10 +18,23 @@ class StatsDisplay(ScrollableContainer): stats_display--dropped_enc """ DEFAULT_CSS = """ - Grid { - grid-size:4; - grid-rows:4; - } + /* StatsDisplay { + Grid { + grid-size:4; + grid-rows:4; + min-height:8; + } + TextReadout { + border:solid $primary; + .text_readout--label { + height:1; + align:center middle; + } + .text_readout--text { + align:center middle; + } + } + }*/ """ COMPONENT_CLASSES = { "stats_display--cpu",