Some cleanup in interface kit. From unused code warnings (before I updated buildtools).

This commit is contained in:
Fredrik Holmqvist
2012-02-11 18:43:19 +01:00
parent 37ea4f77f7
commit 3e2017d24e
4 changed files with 0 additions and 30 deletions
-1
View File
@@ -177,7 +177,6 @@ BButton::Draw(BRect updateRect)
rgb_color buttonBgColor = tint_color(panelBgColor, B_LIGHTEN_1_TINT);
rgb_color lightColor;
rgb_color maxLightColor;
rgb_color maxShadowColor = tint_color(panelBgColor, B_DARKEN_MAX_TINT);
rgb_color dark1BorderColor;
rgb_color dark2BorderColor;
-18
View File
@@ -772,14 +772,7 @@ BStatusBar::_SetTextData(BString& text, const char* source,
if (text == source)
return;
float oldWidth;
if (rightAligned)
oldWidth = Bounds().right - fTextDivider;
else
oldWidth = fTextDivider;
bool oldHasText = _HasText();
text = source;
BString newString;
@@ -788,17 +781,6 @@ BStatusBar::_SetTextData(BString& text, const char* source,
else
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())
InvalidateLayout();
-1
View File
@@ -440,7 +440,6 @@ BTextControl::Draw(BRect updateRect)
rgb_color noTint = ui_color(B_PANEL_BACKGROUND_COLOR);
rgb_color lighten1 = tint_color(noTint, B_LIGHTEN_1_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 darken2 = tint_color(noTint, B_DARKEN_2_TINT);
rgb_color darken4 = tint_color(noTint, B_DARKEN_4_TINT);
-10
View File
@@ -3661,12 +3661,9 @@ BTextView::_HandleAlphaKey(const char *bytes, int32 numBytes)
undoBuffer->InputCharacter(numBytes);
}
bool erase = fSelStart != fText->Length();
if (fSelStart != fSelEnd) {
Highlight(fSelStart, fSelEnd);
DeleteText(fSelStart, fSelEnd);
erase = true;
}
if (fAutoindent && numBytes == 1 && *bytes == B_ENTER) {
@@ -3706,7 +3703,6 @@ BTextView::_Refresh(int32 fromOffset, int32 toOffset, bool scroll)
int32 toLine = _LineAt(toOffset);
int32 saveFromLine = fromLine;
int32 saveToLine = toLine;
float saveLineHeight = LineHeight(fromLine);
_RecalculateLineBreaks(&fromLine, &toLine);
@@ -3737,12 +3733,6 @@ BTextView::_Refresh(int32 fromOffset, int32 toOffset, bool scroll)
fromLine = max_c(fromVisible, fromLine);
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);
_RequestDrawLines(fromLine, toLine);