Skip to content

Commit b624249

Browse files
authoredMay 9, 2020
Always use same default tabheader height (#9319)
Previously the default tabheader height was different when using real coordinates. This resulted in the height of tabs changing when switching tabs in sfinv if some tabs used real coordinates.
1 parent 454dbf8 commit b624249

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/gui/guiFormSpecMenu.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ void GUIFormSpecMenu::parseTabHeader(parserData* data, const std::string &elemen
20272027
// Width is not here because tabs are the width of the text, and
20282028
// there's no reason to change that.
20292029
unsigned int i = 0;
2030-
std::vector<std::string> v_geom = {"1", "0.75"}; // Dummy width and default height
2030+
std::vector<std::string> v_geom = {"1", "1"}; // Dummy width and height
20312031
bool auto_width = true;
20322032
if (parts.size() == 7) {
20332033
i++;
@@ -2071,6 +2071,9 @@ void GUIFormSpecMenu::parseTabHeader(parserData* data, const std::string &elemen
20712071
pos = getRealCoordinateBasePos(v_pos);
20722072

20732073
geom = getRealCoordinateGeometry(v_geom);
2074+
// Set default height
2075+
if (parts.size() <= 6)
2076+
geom.Y = m_btn_height * 2;
20742077
pos.Y -= geom.Y; // TabHeader base pos is the bottom, not the top.
20752078
if (auto_width)
20762079
geom.X = DesiredRect.getWidth(); // Set automatic width

0 commit comments

Comments
 (0)
Please sign in to comment.