Skip to content

Instantly share code, notes, and snippets.

@chuangzhu
Created February 23, 2023 05:26
Show Gist options
  • Save chuangzhu/7f338695ac8ecabb15691fbf3e025867 to your computer and use it in GitHub Desktop.
Save chuangzhu/7f338695ac8ecabb15691fbf3e025867 to your computer and use it in GitHub Desktop.
Set bottom bar the same height as status bar, move the clock to the right
diff --git a/src/home.h b/src/home.h
index a34b7155..7f6fb730 100644
--- a/src/home.h
+++ b/src/home.h
@@ -12,7 +12,7 @@
#define PHOSH_TYPE_HOME (phosh_home_get_type())
-#define PHOSH_HOME_BUTTON_HEIGHT 40
+#define PHOSH_HOME_BUTTON_HEIGHT 32
/**
* PhoshHomeState:
diff --git a/src/stylesheet/common.css b/src/stylesheet/common.css
index 37419270..98fdff9e 100644
--- a/src/stylesheet/common.css
+++ b/src/stylesheet/common.css
@@ -21,9 +21,6 @@ phosh-top-panel .indicators {
font-feature-settings: "tnum";
}
-phosh-top-panel .phosh-topbar-clock{
- font-size: 16px;
-}
phosh-top-panel .phosh-topbar-date{
font-size: 14px;
}
diff --git a/src/ui/home.ui b/src/ui/home.ui
index ba9ead2c..1e40aabb 100644
--- a/src/ui/home.ui
+++ b/src/ui/home.ui
@@ -17,7 +17,7 @@
<property name="visible">True</property>
<property name="name">home-bar</property>
<!-- PHOSH_HOME_HEIGHT -->
- <property name="height-request">40</property>
+ <property name="height-request">32</property>
<child type="center">
<object class="GtkEventBox" id="evbox_home">
<property name="visible">True</property>
diff --git a/src/ui/top-panel.ui b/src/ui/top-panel.ui
index 3a9694e7..cc59b50a 100644
--- a/src/ui/top-panel.ui
+++ b/src/ui/top-panel.ui
@@ -178,18 +178,6 @@
</child>
</object> <!-- box_network -->
</child>
- <child type="center">
- <object class="GtkLabel" id="lbl_clock">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="receives_default">True</property>
- <property name="margin_top">2</property>
- <property name="label">00:00</property>
- <style>
- <class name="phosh-topbar-clock"/>
- </style>
- </object>
- </child>
<child>
<object class="GtkBox" id="box_indicators">
<property name="visible">True</property>
@@ -239,10 +227,21 @@
<child>
<object class="PhoshBatteryInfo" id="batteryinfo">
<property name="visible">True</property>
- <property name="margin-end">0</property>
+ <property name="margin-end">8</property>
<property name="icon-size">GTK_ICON_SIZE_SMALL_TOOLBAR</property>
</object>
</child>
+ <child>
+ <object class="GtkLabel" id="lbl_clock">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="label">00:00</property>
+ <style>
+ <class name="phosh-topbar-clock"/>
+ </style>
+ </object>
+ </child>
</object> <!-- box_indicators -->
<packing>
<property name="pack_type">end</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment