]> skyeroc.xyz Git - obs-ctl/commitdiff
Temporarily-re-clutter layout.tcss for dev
authorsbkelley <sb24kelley@gmail.com>
Wed, 3 Dec 2025 03:30:17 +0000 (22:30 -0500)
committersbkelley <sb24kelley@gmail.com>
Wed, 3 Dec 2025 03:30:17 +0000 (22:30 -0500)
src/obs_ctl/app.py
src/obs_ctl/data/layout.tcss
src/obs_ctl/interface/element/bool_control.py
src/obs_ctl/interface/element/text_readout.py
src/obs_ctl/interface/molecule/record_controls.py
src/obs_ctl/interface/molecule/settings_block/pane/obs_settings.py
src/obs_ctl/interface/molecule/stats_display.py

index 778898230903a29c99892db0f60805f3888c5020..d6ff1e35f5edafd25bb10dca754be155c2c84b38 100644 (file)
@@ -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")
index 63b5bad6999546953800cd69653586b9be4774eb..7e0bb14c40dc0be3b8b3f15bbe47ef84dbdc44ba 100644 (file)
@@ -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
+}
index 776bd70b98c79fcd41ad619ae24ff0d29083691c..a07d7fd08983cbdda629301c24943d1a9564db45 100644 (file)
@@ -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",
index 3039dc88e79843902cfa5da5191d529723b4cab5..13826c2c12bd7ef8b3f24fa15b39c6cbafd1c794 100644 (file)
@@ -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",
index ccea563787f2b7bf67c62beb3ceb331ef3fca38f..598dcdd6419792dead0356f2f6b1712495e42b4f 100644 (file)
@@ -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"
             )
 
 
index da897b9ad44f4f1d676005b8f7bc1344c6b28b76..6bd6bc53e8dcc46935c96d60de10f56a2d42042f 100644 (file)
@@ -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",
index 5416b2bca789f8ef06530ad125d1e9c68f110841..de80ec1ae170a02f37031c4160103158af3943e2 100644 (file)
@@ -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",