From a8fc2dccde69175a0f7f0f62e2caefe2bc3e3391 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Wed, 27 Apr 2022 14:31:01 -0500 Subject: [PATCH] A few tweaks --- lib/pages/configurations.rb | 2 +- lib/pages/editor.rb | 12 ++++++------ lib/pages/search.rb | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/pages/configurations.rb b/lib/pages/configurations.rb index c559c86..d1f796f 100644 --- a/lib/pages/configurations.rb +++ b/lib/pages/configurations.rb @@ -39,7 +39,7 @@ module TAC name = File.basename(config_file, ".json") - button "#{name}", width: 0.94 do + button "#{name}", fill: true, text_size: THEME_ICON_SIZE - 3 do change_config(name) if window.backend.tacnet.connected? diff --git a/lib/pages/editor.rb b/lib/pages/editor.rb index 6cb232c..e952f48 100644 --- a/lib/pages/editor.rb +++ b/lib/pages/editor.rb @@ -32,7 +32,7 @@ module TAC flow(width: 1.0, height: 1.0) do stack width: 0.33333, height: 1.0, border_thickness_right: 1, border_color: [0, Gosu::Color::BLACK, 0, 0] do @groups_menu = flow(width: 1.0) do - label "Groups", text_size: THEME_SUBHEADING_TEXT_SIZE + label "Groups", text_size: THEME_SUBHEADING_TEXT_SIZE, fill: true, text_align: :center button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: THEME_ICON_SIZE, tip: "Add group" do push_state(TAC::Dialog::NamePromptDialog, title: "Create Group", list: window.backend.config.groups, callback_method: method(:create_group)) @@ -90,7 +90,7 @@ module TAC stack width: 0.33333, height: 1.0, border_thickness_right: 1, border_color: [0, Gosu::Color::BLACK, 0, 0] do @actions_menu = flow(width: 1.0) do - label "Actions", text_size: THEME_SUBHEADING_TEXT_SIZE + label "Actions", text_size: THEME_SUBHEADING_TEXT_SIZE, fill: true, text_align: :center button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: THEME_ICON_SIZE, tip: "Add action" do if @active_group @@ -157,7 +157,7 @@ module TAC stack width: 0.331, height: 1.0 do @variables_menu = flow(width: 1.0) do - label "Variables", text_size: THEME_SUBHEADING_TEXT_SIZE + label "Variables", text_size: THEME_SUBHEADING_TEXT_SIZE, fill: true, text_align: :center button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: THEME_ICON_SIZE, tip: "Add variable" do if @active_action push_state(TAC::Dialog::VariableDialog, title: "Create Variable", callback_method: method(:create_variable)) @@ -323,7 +323,7 @@ module TAC flow width: 1.0, **THEME_ITEM_CONTAINER_PADDING do background i.even? ? THEME_EVEN_COLOR : THEME_ODD_COLOR - button group.name, width: 0.8 do + button group.name, fill: true, text_size: THEME_ICON_SIZE - 3 do @active_group = group @active_group_label.value = group.name @active_action = nil @@ -357,7 +357,7 @@ module TAC background i.even? ? THEME_EVEN_COLOR : THEME_ODD_COLOR flow width: 1.0 do - button action.name, width: 0.72 do + button action.name, fill: true, text_size: THEME_ICON_SIZE - 3 do @active_action = action @active_action_label.value = action.name @@ -398,7 +398,7 @@ module TAC background i.even? ? THEME_EVEN_COLOR : THEME_ODD_COLOR flow(width: 1.0) do - button "#{variable.name}", width: 0.89, tip: "Edit variable" do + button "#{variable.name}", fill: true, text_size: THEME_ICON_SIZE - 3, tip: "Edit variable" do push_state(Dialog::VariableDialog, title: "Edit Variable", variable: variable, callback_method: method(:update_variable)) end diff --git a/lib/pages/search.rb b/lib/pages/search.rb index 7461ed6..957c0c1 100644 --- a/lib/pages/search.rb +++ b/lib/pages/search.rb @@ -5,7 +5,7 @@ module TAC header_bar("Search") menu_bar.clear do - search = edit_line "", width: 0.9, height: 1.0 + search = edit_line "", fill: true, height: 1.0 button get_image("#{TAC::ROOT_PATH}/media/icons/zoom.png"), image_height: 1.0 do unless search.value.strip.empty? search_results = search_config(search.value.downcase.strip)