Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
08377b3f
Commit
08377b3f
authored
May 21, 2020
by
Dominik 'dreamsComeTrue' Jasiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarifies 'icon_separation' in TabContainer (instead of 'hseparation')
Fixes: #38911
parent
92394120
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
TabContainer.xml
doc/classes/TabContainer.xml
+2
-2
tab_container.cpp
scene/gui/tab_container.cpp
+2
-2
default_theme.cpp
scene/resources/default_theme/default_theme.cpp
+1
-1
No files found.
doc/classes/TabContainer.xml
View file @
08377b3f
...
...
@@ -204,8 +204,8 @@
<theme_item
name=
"font_color_fg"
type=
"Color"
default=
"Color( 0.94, 0.94, 0.94, 1 )"
>
Font color of the currently selected tab.
</theme_item>
<theme_item
name=
"
h
separation"
type=
"int"
default=
"4"
>
Horizontal separation between tabs
.
<theme_item
name=
"
icon_
separation"
type=
"int"
default=
"4"
>
Space between tab's name and its icon
.
</theme_item>
<theme_item
name=
"increment"
type=
"Texture2D"
>
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
...
...
scene/gui/tab_container.cpp
View file @
08377b3f
...
...
@@ -278,7 +278,7 @@ void TabContainer::_notification(int p_what) {
Color
font_color_bg
=
get_theme_color
(
"font_color_bg"
);
Color
font_color_disabled
=
get_theme_color
(
"font_color_disabled"
);
int
side_margin
=
get_theme_constant
(
"side_margin"
);
int
icon_text_distance
=
get_theme_constant
(
"
h
separation"
);
int
icon_text_distance
=
get_theme_constant
(
"
icon_
separation"
);
// Find out start and width of the header area.
int
header_x
=
side_margin
;
...
...
@@ -465,7 +465,7 @@ int TabContainer::_get_tab_width(int p_index) const {
if
(
icon
.
is_valid
())
{
width
+=
icon
->
get_width
();
if
(
text
!=
""
)
{
width
+=
get_theme_constant
(
"
h
separation"
);
width
+=
get_theme_constant
(
"
icon_
separation"
);
}
}
}
...
...
scene/resources/default_theme/default_theme.cpp
View file @
08377b3f
...
...
@@ -681,7 +681,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme
->
set_color
(
"font_color_disabled"
,
"TabContainer"
,
control_font_color_disabled
);
theme
->
set_constant
(
"side_margin"
,
"TabContainer"
,
8
*
scale
);
theme
->
set_constant
(
"
h
separation"
,
"TabContainer"
,
4
*
scale
);
theme
->
set_constant
(
"
icon_
separation"
,
"TabContainer"
,
4
*
scale
);
// Tabs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment