chore: checkpoint current workspace changes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <XCEditor/Collections/UIEditorTabStrip.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -77,15 +78,8 @@ float ResolveTabTextLeft(
|
||||
const UIRect& rect,
|
||||
const UIEditorTabStripItem& item,
|
||||
const UIEditorTabStripMetrics& metrics) {
|
||||
const float padding =
|
||||
(std::max)(
|
||||
ClampNonNegative(metrics.layoutMetrics.tabHorizontalPadding),
|
||||
ClampNonNegative(metrics.labelInsetX));
|
||||
const float availableLeft = rect.x + padding;
|
||||
const float availableRight = rect.x + rect.width - padding;
|
||||
const float availableWidth = (std::max)(availableRight - availableLeft, 0.0f);
|
||||
const float labelWidth = ResolveEstimatedLabelWidth(item, metrics);
|
||||
return availableLeft + (std::max)(0.0f, (availableWidth - labelWidth) * 0.5f);
|
||||
return rect.x + std::floor((std::max)(0.0f, rect.width - labelWidth) * 0.5f);
|
||||
}
|
||||
|
||||
UIColor ResolveTabFillColor(
|
||||
|
||||
Reference in New Issue
Block a user