Skip to content

Commit

Permalink
button height scale
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Apr 24, 2024
1 parent 22b4e89 commit 04bba49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/data/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="width-request">250</property>
<object class="GtkBox" id="ui_box_username">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
Expand Down Expand Up @@ -279,7 +278,6 @@
<object class="GtkButton" id="ui_button_login">
<property name="label" translatable="yes">Login</property>
<property name="width-request">128</property>
<property name="height-request">31</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="receives-default">True</property>
Expand Down Expand Up @@ -403,7 +401,7 @@
</packing>
</child>
<child>
<object class="GtkBox">
<object class="GtkBox" id="ui_box_reset_buttons">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
Expand Down
5 changes: 4 additions & 1 deletion src/module/gtkwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ def apply_scale(self):
# login box width
self.o("ui_box_reset_passwd").set_size_request(250*scale, -1)
self.o("ui_box_login").set_size_request(250*scale, -1)
self.o("ui_button_login").set_size_request(128*scale, -1)
# login button & entry 128 x 31
for but in ["ui_button_login", "ui_box_username", "ui_entry_reset_username", "ui_entry_password",
"ui_entry_new_password1", "ui_entry_new_password2", "ui_box_reset_buttons"]:
self.o(but).set_size_request(128*scale, 31*scale)
# user list
self.o("ui_popover_userlist").set_size_request(200*scale, self.height/3)

Expand Down

0 comments on commit 04bba49

Please sign in to comment.