* fix warnings in Keymap preflet about hidden virtual by renaming SetFont()
to SetBaseFont() (and fFont to fBaseFont) * enabled -Werror for all preflets git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38203 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+1
-27
@@ -1390,33 +1390,7 @@ if $(HAIKU_NO_WERROR) != 1 {
|
||||
EnableWerror src kits textencoding ;
|
||||
# EnableWerror src kits tracker ;
|
||||
EnableWerror src kits translation ;
|
||||
EnableWerror src preferences appearance ;
|
||||
EnableWerror src preferences backgrounds ;
|
||||
EnableWerror src preferences bluetooth ;
|
||||
EnableWerror src preferences cpufrequency ;
|
||||
EnableWerror src preferences datatranslations ;
|
||||
EnableWerror src preferences deskbar ;
|
||||
EnableWerror src preferences filetypes ;
|
||||
EnableWerror src preferences fonts ;
|
||||
EnableWerror src preferences joysticks ;
|
||||
EnableWerror src preferences keyboard ;
|
||||
# EnableWerror src preferences keymap ;
|
||||
EnableWerror src preferences locale ;
|
||||
EnableWerror src preferences mail ;
|
||||
EnableWerror src preferences media ;
|
||||
EnableWerror src preferences mouse ;
|
||||
EnableWerror src preferences network ;
|
||||
EnableWerror src preferences notifications ;
|
||||
EnableWerror src preferences opengl ;
|
||||
EnableWerror src preferences print ;
|
||||
EnableWerror src preferences screen ;
|
||||
EnableWerror src preferences screensaver ;
|
||||
EnableWerror src preferences shortcuts ;
|
||||
EnableWerror src preferences sounds ;
|
||||
EnableWerror src preferences time ;
|
||||
EnableWerror src preferences touchpad ;
|
||||
EnableWerror src preferences tracker ;
|
||||
EnableWerror src preferences virtualmemory ;
|
||||
EnableWerror src preferences ;
|
||||
EnableWerror src servers app ;
|
||||
# EnableWerror src servers bluetooth ;
|
||||
EnableWerror src servers cddb_daemon ;
|
||||
|
||||
@@ -77,14 +77,14 @@ KeyboardLayoutView::SetTarget(BMessenger target)
|
||||
|
||||
|
||||
void
|
||||
KeyboardLayoutView::SetFont(const BFont& font)
|
||||
KeyboardLayoutView::SetBaseFont(const BFont& font)
|
||||
{
|
||||
fFont = font;
|
||||
fBaseFont = font;
|
||||
|
||||
font_height fontHeight;
|
||||
fFont.GetHeight(&fontHeight);
|
||||
fBaseFont.GetHeight(&fontHeight);
|
||||
fBaseFontHeight = fontHeight.ascent + fontHeight.descent;
|
||||
fBaseFontSize = fFont.Size();
|
||||
fBaseFontSize = fBaseFont.Size();
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
@@ -95,7 +95,7 @@ KeyboardLayoutView::AttachedToWindow()
|
||||
{
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
|
||||
SetFont(*be_plain_font);
|
||||
SetBaseFont(*be_plain_font);
|
||||
fSpecialFont = *be_fixed_font;
|
||||
fModifiers = modifiers();
|
||||
}
|
||||
@@ -277,7 +277,7 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
||||
|
||||
BView* view = new BView(rect, "drag", B_FOLLOW_NONE, 0);
|
||||
bitmap->AddChild(view);
|
||||
|
||||
|
||||
view->SetHighColor(0, 0, 0, 0);
|
||||
view->FillRect(view->Bounds());
|
||||
view->SetDrawingMode(B_OP_ALPHA);
|
||||
@@ -860,7 +860,7 @@ KeyboardLayoutView::_GetKeyLabel(const Key* key, char* text, size_t textSize,
|
||||
keyKind = kSymbolKey;
|
||||
} else {
|
||||
bool hasGlyphs;
|
||||
fFont.GetHasGlyphs(bytes, 1, &hasGlyphs);
|
||||
fBaseFont.GetHasGlyphs(bytes, 1, &hasGlyphs);
|
||||
if (hasGlyphs)
|
||||
strlcpy(text, bytes, sizeof(text));
|
||||
}
|
||||
@@ -1062,8 +1062,8 @@ KeyboardLayoutView::_SetFontSize(BView* view, key_kind keyKind)
|
||||
|
||||
switch (keyKind) {
|
||||
case kNormalKey:
|
||||
fFont.SetSize(fontSize);
|
||||
view->SetFont(&fFont);
|
||||
fBaseFont.SetSize(fontSize);
|
||||
view->SetFont(&fBaseFont);
|
||||
break;
|
||||
case kSpecialKey:
|
||||
fSpecialFont.SetSize(fontSize * 0.7);
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
KeyboardLayout* GetKeyboardLayout() { return fLayout; }
|
||||
|
||||
void SetFont(const BFont& font);
|
||||
void SetBaseFont(const BFont& font);
|
||||
|
||||
void SetEditable(bool editable);
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
BPoint fDropPoint;
|
||||
|
||||
BSize fOldSize;
|
||||
BFont fFont;
|
||||
BFont fBaseFont;
|
||||
BFont fSpecialFont;
|
||||
float fBaseFontHeight;
|
||||
float fBaseFontSize;
|
||||
|
||||
@@ -244,7 +244,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
||||
if (item != NULL) {
|
||||
BFont font;
|
||||
font.SetFamilyAndStyle(item->Label(), NULL);
|
||||
fKeyboardLayoutView->SetFont(font);
|
||||
fKeyboardLayoutView->SetBaseFont(font);
|
||||
fTextControl->TextView()->SetFontAndColor(&font);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user