Skip to content

Commit

Permalink
new account widget layout
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Oct 15, 2023
1 parent 7a01e75 commit 77137e5
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 94 deletions.
11 changes: 9 additions & 2 deletions apps/gtkmm/data/css/style.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
label.account_code {
font-size: 18px;
font-size: 24px;
font-weight: bold;
font-family: monospace;
}

label.account_issuer {
font-size: 10px;
font-size: 12px;
}

label.account_name {
font-size: 14px;
font-weight: bold;
}

.account {
border-radius: 12px;
padding: 8px;
background-color: rgba(208, 208, 208, 0.5);
color: black;
}
76 changes: 40 additions & 36 deletions apps/gtkmm/data/ui/account_widget.ui
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.16.0 -->
<!-- Created with Cambalache 0.17.0 -->
<interface>
<requires lib="gtk" version="4.6"/>
<object class="GtkBox" id="account">
<property name="css-classes">account</property>
<property name="margin-bottom">4</property>
<property name="margin-end">4</property>
<property name="margin-start">4</property>
<property name="margin-top">4</property>
<property name="spacing">8</property>
<child>
<object class="GtkBox">
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<property name="vexpand">True</property>
<property name="vexpand-set">True</property>
<child>
<object class="GtkLabel" id="issuer">
<property name="css-classes">account_issuer</property>
<object class="GtkLabel" id="name">
<property name="css-classes">account_name</property>
<property name="ellipsize">end</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="justify">fill</property>
<property name="label">issuer</property>
<property name="label">my_account@issuer.online.com</property>
<property name="natural-wrap-mode">none</property>
<property name="single-line-mode">True</property>
<property name="vexpand">True</property>
Expand All @@ -34,37 +30,45 @@
</object>
</child>
<child>
<object class="GtkLabel" id="name">
<property name="css-classes">account_name</property>
<property name="halign">start</property>
<object class="GtkBox">
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="justify">fill</property>
<property name="label">name</property>
<property name="natural-wrap-mode">none</property>
<property name="single-line-mode">True</property>
<property name="homogeneous">True</property>
<property name="spacing">4</property>
<property name="vexpand">True</property>
<property name="vexpand-set">True</property>
<property name="xalign">0.0</property>
<property name="yalign">0.0</property>
<style/>
<child>
<object class="GtkLabel" id="issuer">
<property name="css-classes">account_issuer</property>
<property name="ellipsize">end</property>
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="justify">fill</property>
<property name="label">The accounts issuer</property>
<property name="natural-wrap-mode">none</property>
<property name="single-line-mode">True</property>
<property name="xalign">0.0</property>
<property name="yalign">1.800000000000001</property>
<style/>
</object>
</child>
<child>
<object class="GtkLabel" id="code">
<property name="css-classes">account_code</property>
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="justify">fill</property>
<property name="label">123 456</property>
<property name="lines">1</property>
<property name="single-line-mode">True</property>
<property name="valign">baseline</property>
<property name="xalign">1.0</property>
<property name="yalign">1.8</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="code">
<property name="css-classes">account_code</property>
<property name="hexpand">True</property>
<property name="hexpand-set">True</property>
<property name="justify">fill</property>
<property name="label">code</property>
<property name="lines">1</property>
<property name="single-line-mode">True</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="vexpand-set">True</property>
<property name="xalign">1.0</property>
<property name="yalign">0.0</property>
</object>
</child>
</object>
</interface>
99 changes: 48 additions & 51 deletions apps/gtkmm/data/ui/authppgtk.cmb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(2,"gtk","4.6",None)
</ui_library>
<css>
(1,"authppgtk.css",None,None)
(1,"../css/style.css",None,None)
</css>
<css_ui>
(1,2)
Expand All @@ -31,10 +31,11 @@
(1,19,"GtkButton","btn_refresh_with_spinner",7,None,"end",None,2,None),
(1,20,"GtkSpinner","spinner",19,None,None,None,-1,None),
(2,1,"GtkBox","account",None,None,None,None,None,None),
(2,3,"GtkLabel","code",1,None,None,None,1,None),
(2,4,"GtkBox",None,1,None,None,None,None,None),
(2,5,"GtkLabel","name",4,None,None,None,1,None),
(2,6,"GtkLabel","issuer",4,None,None,None,None,None)
(2,7,"GtkBox",None,1,None,None,None,-1,None),
(2,9,"GtkBox",None,7,None,None,None,1,None),
(2,11,"GtkLabel","code",9,None,None,None,1,None),
(2,13,"GtkLabel","issuer",9,None,None,None,None,None),
(2,14,"GtkLabel","name",7,None,None,None,None,None)
</object>
<object_property>
(1,1,"GtkWindow","default-height","600",None,None,None,None,None,None,None,None,None),
Expand All @@ -43,10 +44,6 @@
(1,1,"GtkWindow","titlebar",None,None,None,None,None,7,None,None,None,None),
(1,2,"GtkBox","spacing","5",None,None,None,None,None,None,None,None,None),
(1,2,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(1,2,"GtkWidget","margin-bottom","8",None,None,None,None,None,None,None,None,None),
(1,2,"GtkWidget","margin-end","8",None,None,None,None,None,None,None,None,None),
(1,2,"GtkWidget","margin-start","8",None,None,None,None,None,None,None,None,None),
(1,2,"GtkWidget","margin-top","8",None,None,None,None,None,None,None,None,None),
(1,3,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(1,4,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(1,8,"GtkMenuButton","icon-name","open-menu-symbolic",None,None,None,None,None,None,None,None,None),
Expand All @@ -61,53 +58,53 @@
(1,19,"GtkWidget","visible","False",None,None,None,None,None,None,None,None,None),
(1,20,"GtkSpinner","spinning","True",None,None,None,None,None,None,None,None,None),
(2,1,"GtkBox","spacing","8",None,None,None,None,None,None,None,None,None),
(2,1,"GtkWidget","css-classes","account",None,None,None,None,None,None,None,None,None),
(2,1,"GtkWidget","margin-bottom","4",None,None,None,None,None,None,None,None,None),
(2,1,"GtkWidget","margin-end","4",None,None,None,None,None,None,None,None,None),
(2,1,"GtkWidget","margin-start","4",None,None,None,None,None,None,None,None,None),
(2,1,"GtkWidget","margin-top","4",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","label","code",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","lines","1",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","xalign","1.0",None,None,None,None,None,None,None,None,None),
(2,3,"GtkLabel","yalign","0.0",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","css-classes","account_code",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(2,3,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,4,"GtkBox","spacing","4",None,None,None,None,None,None,None,None,None),
(2,4,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(2,4,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,4,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,4,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(2,4,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","label","name",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","natural-wrap-mode","none",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","xalign","0.0",None,None,None,None,None,None,None,None,None),
(2,5,"GtkLabel","yalign","0.0",None,None,None,None,None,None,None,None,None),
(2,5,"GtkWidget","css-classes","account_name",None,None,None,None,None,None,None,None,None),
(2,5,"GtkWidget","halign","start",None,None,None,None,None,None,None,None,None),
(2,5,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,5,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","label","issuer",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","natural-wrap-mode","none",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","xalign","0.0",None,None,None,None,None,None,None,None,None),
(2,6,"GtkLabel","yalign","0.0",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","css-classes","account_issuer",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","halign","start",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(2,6,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None)
(2,7,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(2,9,"GtkBox","homogeneous","True",None,None,None,None,None,None,None,None,None),
(2,9,"GtkBox","spacing","4",None,None,None,None,None,None,None,None,None),
(2,9,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,9,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,9,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(2,9,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","label","123 456",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","lines","1",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","xalign","1.0",None,None,None,None,None,None,None,None,None),
(2,11,"GtkLabel","yalign","1.8",None,None,None,None,None,None,None,None,None),
(2,11,"GtkWidget","css-classes","account_code",None,None,None,None,None,None,None,None,None),
(2,11,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,11,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,11,"GtkWidget","valign","baseline",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","ellipsize","end",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","label","The accounts issuer",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","natural-wrap-mode","none",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","xalign","0.0",None,None,None,None,None,None,None,None,None),
(2,13,"GtkLabel","yalign","1.800000000000001",None,None,None,None,None,None,None,None,None),
(2,13,"GtkWidget","css-classes","account_issuer",None,None,None,None,None,None,None,None,None),
(2,13,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(2,13,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","ellipsize","end",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","justify","fill",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","label","[email protected]",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","natural-wrap-mode","none",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","single-line-mode","True",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","xalign","0.0",None,None,None,None,None,None,None,None,None),
(2,14,"GtkLabel","yalign","0.0",None,None,None,None,None,None,None,None,None),
(2,14,"GtkWidget","css-classes","account_name",None,None,None,None,None,None,None,None,None),
(2,14,"GtkWidget","halign","start",None,None,None,None,None,None,None,None,None),
(2,14,"GtkWidget","hexpand-set","True",None,None,None,None,None,None,None,None,None),
(2,14,"GtkWidget","vexpand","True",None,None,None,None,None,None,None,None,None),
(2,14,"GtkWidget","vexpand-set","True",None,None,None,None,None,None,None,None,None)
</object_property>
<object_data>
(2,5,"GtkWidget",1,1,None,None,None,None,None,None),
(2,6,"GtkWidget",1,1,None,None,None,None,None,None)
(2,13,"GtkWidget",1,1,None,None,None,None,None,None),
(2,14,"GtkWidget",1,1,None,None,None,None,None,None)
</object_data>
</cambalache-project>
6 changes: 1 addition & 5 deletions apps/gtkmm/data/ui/authppgtk.ui
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.16.0 -->
<!-- Created with Cambalache 0.17.0 -->
<interface>
<!-- interface-name authppgtk.ui -->
<requires lib="gio" version="2.32"/>
Expand Down Expand Up @@ -36,10 +36,6 @@
</property>
<child>
<object class="GtkBox" id="content">
<property name="margin-bottom">8</property>
<property name="margin-end">8</property>
<property name="margin-start">8</property>
<property name="margin-top">8</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
Expand Down

0 comments on commit 77137e5

Please sign in to comment.