Some cleanup in interface kit. From unused code warnings (before I updated buildtools).
This commit is contained in:
@@ -177,7 +177,6 @@ BButton::Draw(BRect updateRect)
|
|||||||
rgb_color buttonBgColor = tint_color(panelBgColor, B_LIGHTEN_1_TINT);
|
rgb_color buttonBgColor = tint_color(panelBgColor, B_LIGHTEN_1_TINT);
|
||||||
rgb_color lightColor;
|
rgb_color lightColor;
|
||||||
rgb_color maxLightColor;
|
rgb_color maxLightColor;
|
||||||
rgb_color maxShadowColor = tint_color(panelBgColor, B_DARKEN_MAX_TINT);
|
|
||||||
|
|
||||||
rgb_color dark1BorderColor;
|
rgb_color dark1BorderColor;
|
||||||
rgb_color dark2BorderColor;
|
rgb_color dark2BorderColor;
|
||||||
|
|||||||
@@ -772,14 +772,7 @@ BStatusBar::_SetTextData(BString& text, const char* source,
|
|||||||
if (text == source)
|
if (text == source)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float oldWidth;
|
|
||||||
if (rightAligned)
|
|
||||||
oldWidth = Bounds().right - fTextDivider;
|
|
||||||
else
|
|
||||||
oldWidth = fTextDivider;
|
|
||||||
|
|
||||||
bool oldHasText = _HasText();
|
bool oldHasText = _HasText();
|
||||||
|
|
||||||
text = source;
|
text = source;
|
||||||
|
|
||||||
BString newString;
|
BString newString;
|
||||||
@@ -788,17 +781,6 @@ BStatusBar::_SetTextData(BString& text, const char* source,
|
|||||||
else
|
else
|
||||||
newString << combineWith << text;
|
newString << combineWith << text;
|
||||||
|
|
||||||
float newWidth = ceilf(StringWidth(newString.String()));
|
|
||||||
// might still be smaller in Draw(), but we use it
|
|
||||||
// only for the invalidation rect here
|
|
||||||
|
|
||||||
// determine which part of the view needs an update
|
|
||||||
float invalidateWidth = max_c(newWidth, oldWidth);
|
|
||||||
|
|
||||||
float position = 0.0;
|
|
||||||
if (rightAligned)
|
|
||||||
position = Bounds().right - invalidateWidth;
|
|
||||||
|
|
||||||
if (oldHasText != _HasText())
|
if (oldHasText != _HasText())
|
||||||
InvalidateLayout();
|
InvalidateLayout();
|
||||||
|
|
||||||
|
|||||||
@@ -440,7 +440,6 @@ BTextControl::Draw(BRect updateRect)
|
|||||||
rgb_color noTint = ui_color(B_PANEL_BACKGROUND_COLOR);
|
rgb_color noTint = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
rgb_color lighten1 = tint_color(noTint, B_LIGHTEN_1_TINT);
|
rgb_color lighten1 = tint_color(noTint, B_LIGHTEN_1_TINT);
|
||||||
rgb_color lighten2 = tint_color(noTint, B_LIGHTEN_2_TINT);
|
rgb_color lighten2 = tint_color(noTint, B_LIGHTEN_2_TINT);
|
||||||
rgb_color lightenMax = tint_color(noTint, B_LIGHTEN_MAX_TINT);
|
|
||||||
rgb_color darken1 = tint_color(noTint, B_DARKEN_1_TINT);
|
rgb_color darken1 = tint_color(noTint, B_DARKEN_1_TINT);
|
||||||
rgb_color darken2 = tint_color(noTint, B_DARKEN_2_TINT);
|
rgb_color darken2 = tint_color(noTint, B_DARKEN_2_TINT);
|
||||||
rgb_color darken4 = tint_color(noTint, B_DARKEN_4_TINT);
|
rgb_color darken4 = tint_color(noTint, B_DARKEN_4_TINT);
|
||||||
|
|||||||
@@ -3661,12 +3661,9 @@ BTextView::_HandleAlphaKey(const char *bytes, int32 numBytes)
|
|||||||
undoBuffer->InputCharacter(numBytes);
|
undoBuffer->InputCharacter(numBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool erase = fSelStart != fText->Length();
|
|
||||||
|
|
||||||
if (fSelStart != fSelEnd) {
|
if (fSelStart != fSelEnd) {
|
||||||
Highlight(fSelStart, fSelEnd);
|
Highlight(fSelStart, fSelEnd);
|
||||||
DeleteText(fSelStart, fSelEnd);
|
DeleteText(fSelStart, fSelEnd);
|
||||||
erase = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fAutoindent && numBytes == 1 && *bytes == B_ENTER) {
|
if (fAutoindent && numBytes == 1 && *bytes == B_ENTER) {
|
||||||
@@ -3706,7 +3703,6 @@ BTextView::_Refresh(int32 fromOffset, int32 toOffset, bool scroll)
|
|||||||
int32 toLine = _LineAt(toOffset);
|
int32 toLine = _LineAt(toOffset);
|
||||||
int32 saveFromLine = fromLine;
|
int32 saveFromLine = fromLine;
|
||||||
int32 saveToLine = toLine;
|
int32 saveToLine = toLine;
|
||||||
float saveLineHeight = LineHeight(fromLine);
|
|
||||||
|
|
||||||
_RecalculateLineBreaks(&fromLine, &toLine);
|
_RecalculateLineBreaks(&fromLine, &toLine);
|
||||||
|
|
||||||
@@ -3737,12 +3733,6 @@ BTextView::_Refresh(int32 fromOffset, int32 toOffset, bool scroll)
|
|||||||
fromLine = max_c(fromVisible, fromLine);
|
fromLine = max_c(fromVisible, fromLine);
|
||||||
toLine = min_c(toLine, toVisible);
|
toLine = min_c(toLine, toVisible);
|
||||||
|
|
||||||
int32 drawOffset = fromOffset;
|
|
||||||
if (LineHeight(fromLine) != saveLineHeight
|
|
||||||
|| newHeight < saveHeight || fromLine < saveFromLine
|
|
||||||
|| fAlignment != B_ALIGN_LEFT)
|
|
||||||
drawOffset = (*fLines)[fromLine]->offset;
|
|
||||||
|
|
||||||
_AutoResize(false);
|
_AutoResize(false);
|
||||||
|
|
||||||
_RequestDrawLines(fromLine, toLine);
|
_RequestDrawLines(fromLine, toLine);
|
||||||
|
|||||||
Reference in New Issue
Block a user