From 9e46f3054cf527c6603087fe2fbe24e6f9a7a8a8 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 10 Dec 2023 13:41:54 +0100 Subject: [PATCH] Added tab styles --- I18N Commander/App/theme/Test UI.tscn | 9 ++++++--- .../App/theme/tabs/background_style_box_flat.tres | 5 ----- .../App/theme/tabs/tab_not_used_style_box_flat.tres | 13 +++++++++++++ .../App/theme/tabs/tab_selected_style_box_flat.tres | 13 +++++++++++++ I18N Commander/App/theme/ui_theme_dark.tres | 7 +++++-- 5 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 I18N Commander/App/theme/tabs/tab_not_used_style_box_flat.tres create mode 100644 I18N Commander/App/theme/tabs/tab_selected_style_box_flat.tres diff --git a/I18N Commander/App/theme/Test UI.tscn b/I18N Commander/App/theme/Test UI.tscn index 66b8cfc..2e09fb9 100644 --- a/I18N Commander/App/theme/Test UI.tscn +++ b/I18N Commander/App/theme/Test UI.tscn @@ -12,9 +12,12 @@ grow_vertical = 2 theme = ExtResource("1_x217b") [node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 0 -offset_right = 40.0 -offset_bottom = 40.0 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 [node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"] layout_mode = 2 diff --git a/I18N Commander/App/theme/tabs/background_style_box_flat.tres b/I18N Commander/App/theme/tabs/background_style_box_flat.tres index c922a7c..146f71a 100644 --- a/I18N Commander/App/theme/tabs/background_style_box_flat.tres +++ b/I18N Commander/App/theme/tabs/background_style_box_flat.tres @@ -2,8 +2,3 @@ [resource] bg_color = Color(0.2, 0.2, 0.2, 1) -corner_radius_top_left = 12 -corner_radius_top_right = 12 -expand_margin_left = 3.0 -expand_margin_top = 12.0 -expand_margin_right = 12.0 diff --git a/I18N Commander/App/theme/tabs/tab_not_used_style_box_flat.tres b/I18N Commander/App/theme/tabs/tab_not_used_style_box_flat.tres new file mode 100644 index 0000000..133c69b --- /dev/null +++ b/I18N Commander/App/theme/tabs/tab_not_used_style_box_flat.tres @@ -0,0 +1,13 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://b8v8084ty86la"] + +[resource] +content_margin_left = 48.0 +content_margin_top = 24.0 +content_margin_right = 48.0 +content_margin_bottom = 24.0 +bg_color = Color(0.239216, 0.239216, 0.239216, 1) +border_width_left = 6 +border_width_top = 12 +border_width_right = 6 +border_width_bottom = 12 +border_color = Color(0.2, 0.2, 0.2, 1) diff --git a/I18N Commander/App/theme/tabs/tab_selected_style_box_flat.tres b/I18N Commander/App/theme/tabs/tab_selected_style_box_flat.tres new file mode 100644 index 0000000..6233a27 --- /dev/null +++ b/I18N Commander/App/theme/tabs/tab_selected_style_box_flat.tres @@ -0,0 +1,13 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://dp37edlumlbaj"] + +[resource] +content_margin_left = 48.0 +content_margin_top = 24.0 +content_margin_right = 48.0 +content_margin_bottom = 24.0 +bg_color = Color(0.160784, 0.160784, 0.160784, 1) +border_width_left = 6 +border_width_top = 12 +border_width_right = 6 +border_width_bottom = 12 +border_color = Color(0.2, 0.2, 0.2, 1) diff --git a/I18N Commander/App/theme/ui_theme_dark.tres b/I18N Commander/App/theme/ui_theme_dark.tres index 63f93a0..91185db 100644 --- a/I18N Commander/App/theme/ui_theme_dark.tres +++ b/I18N Commander/App/theme/ui_theme_dark.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=9 format=3 uid="uid://uqhultm05f5a"] +[gd_resource type="Theme" load_steps=11 format=3 uid="uid://uqhultm05f5a"] [ext_resource type="StyleBox" uid="uid://chaurklijlgu7" path="res://theme/btn/d_style_box_flat_focus.tres" id="1_uspte"] [ext_resource type="StyleBox" uid="uid://l1tjpnljc6c1" path="res://theme/btn/d_style_box_flat_hover.tres" id="2_pm5yo"] @@ -7,6 +7,8 @@ [ext_resource type="StyleBox" uid="uid://bgka0t482q0dh" path="res://theme/checkbox/style_box_empty.tres" id="5_1ugrl"] [ext_resource type="StyleBox" uid="uid://batay7mp6vfon" path="res://theme/checkBtn/style_box_empty.tres" id="6_i1h00"] [ext_resource type="StyleBox" uid="uid://cens6ndafk28w" path="res://theme/panel/d_style_box_flat.tres" id="7_3s8mj"] +[ext_resource type="StyleBox" uid="uid://dp37edlumlbaj" path="res://theme/tabs/tab_selected_style_box_flat.tres" id="8_4hym3"] +[ext_resource type="StyleBox" uid="uid://b8v8084ty86la" path="res://theme/tabs/tab_not_used_style_box_flat.tres" id="8_5xc56"] [ext_resource type="StyleBox" uid="uid://bumfybajbkybi" path="res://theme/tabs/background_style_box_flat.tres" id="8_l6mbx"] [resource] @@ -39,7 +41,8 @@ MarginContainer/constants/margin_top = 12 Panel/styles/panel = ExtResource("7_3s8mj") PopupMenu/font_sizes/font_separator_size = 32 PopupMenu/font_sizes/font_size = 32 -TabBar/font_sizes/font_size = 32 TabContainer/font_sizes/font_size = 32 +TabContainer/styles/tab_selected = ExtResource("8_4hym3") +TabContainer/styles/tab_unselected = ExtResource("8_5xc56") TabContainer/styles/tabbar_background = ExtResource("8_l6mbx") TextEdit/font_sizes/font_size = 32