Appearance: Remove "sub-pixel anti-aliasing is not enabled" message.
FreeType 2.8+ uses a non-patent-encumbered algorithm for this by default, and as we have used it for quite a while now, this message is obsolete.
This commit is contained in:
parent
ec12d1fd3e
commit
166dc2bfec
@ -10,10 +10,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <ft2build.h>
|
|
||||||
#include FT_CONFIG_OPTIONS_H
|
|
||||||
// for detected the availablility of subpixel anti-aliasing
|
|
||||||
|
|
||||||
#include <Box.h>
|
#include <Box.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <LayoutBuilder.h>
|
#include <LayoutBuilder.h>
|
||||||
@ -114,21 +110,6 @@ AntialiasingSettingsView::AntialiasingSettingsView(const char* name)
|
|||||||
fHintingMenuField->SetEnabled(false);
|
fHintingMenuField->SetEnabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
|
||||||
// subpixelAntialiasingDisabledLabel
|
|
||||||
// TODO: Replace with layout friendly constructor once available.
|
|
||||||
fSubpixelAntialiasingDisabledLabel
|
|
||||||
= new BTextView("unavailable label");
|
|
||||||
fSubpixelAntialiasingDisabledLabel->SetText(B_TRANSLATE(
|
|
||||||
"Subpixel based anti-aliasing in combination with glyph hinting is not "
|
|
||||||
"available in this build of Haiku to avoid possible patent issues. To "
|
|
||||||
"enable this feature, you have to build Haiku yourself and enable "
|
|
||||||
"certain options in the libfreetype configuration header."));
|
|
||||||
fSubpixelAntialiasingDisabledLabel->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
|
||||||
fSubpixelAntialiasingDisabledLabel->MakeEditable(false);
|
|
||||||
fSubpixelAntialiasingDisabledLabel->MakeSelectable(false);
|
|
||||||
#endif // !FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
|
||||||
|
|
||||||
BLayoutBuilder::Grid<>(this, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
|
BLayoutBuilder::Grid<>(this, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
|
||||||
// controls pane
|
// controls pane
|
||||||
.Add(fHintingMenuField->CreateLabelLayoutItem(), 0, 0)
|
.Add(fHintingMenuField->CreateLabelLayoutItem(), 0, 0)
|
||||||
@ -139,19 +120,12 @@ AntialiasingSettingsView::AntialiasingSettingsView(const char* name)
|
|||||||
|
|
||||||
.Add(fAverageWeightControl, 0, 2, 2)
|
.Add(fAverageWeightControl, 0, 2, 2)
|
||||||
|
|
||||||
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
|
||||||
// hinting+subpixel unavailable info
|
|
||||||
.Add(fSubpixelAntialiasingDisabledLabel, 0, 3, 2)
|
|
||||||
#else
|
|
||||||
.Add(BSpaceLayoutItem::CreateGlue(), 0, 3, 2)
|
|
||||||
#endif
|
|
||||||
.AddGlue(0, 4)
|
.AddGlue(0, 4)
|
||||||
.SetInsets(B_USE_WINDOW_SPACING);
|
.SetInsets(B_USE_WINDOW_SPACING);
|
||||||
|
|
||||||
_SetCurrentAntialiasing();
|
_SetCurrentAntialiasing();
|
||||||
_SetCurrentHinting();
|
_SetCurrentHinting();
|
||||||
_SetCurrentAverageWeight();
|
_SetCurrentAverageWeight();
|
||||||
_UpdateColors();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,14 +193,6 @@ AntialiasingSettingsView::MessageReceived(BMessage *msg)
|
|||||||
Window()->PostMessage(kMsgUpdate);
|
Window()->PostMessage(kMsgUpdate);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_COLORS_UPDATED:
|
|
||||||
{
|
|
||||||
if (msg->HasColor(ui_color_name(B_PANEL_BACKGROUND_COLOR))
|
|
||||||
|| msg->HasColor(ui_color_name(B_PANEL_TEXT_COLOR))) {
|
|
||||||
_UpdateColors();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
BView::MessageReceived(msg);
|
BView::MessageReceived(msg);
|
||||||
}
|
}
|
||||||
@ -322,23 +288,6 @@ AntialiasingSettingsView::_SetCurrentAverageWeight()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
AntialiasingSettingsView::_UpdateColors()
|
|
||||||
{
|
|
||||||
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
|
||||||
rgb_color infoColor = disable_color(ui_color(B_PANEL_BACKGROUND_COLOR),
|
|
||||||
ui_color(B_PANEL_TEXT_COLOR));
|
|
||||||
|
|
||||||
BFont font;
|
|
||||||
uint32 mode = 0;
|
|
||||||
fSubpixelAntialiasingDisabledLabel->GetFontAndColor(&font, &mode);
|
|
||||||
font.SetFace(B_ITALIC_FACE);
|
|
||||||
fSubpixelAntialiasingDisabledLabel->SetFontAndColor(&font, mode,
|
|
||||||
&infoColor);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AntialiasingSettingsView::SetDefaults()
|
AntialiasingSettingsView::SetDefaults()
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,6 @@ private:
|
|||||||
void _BuildHintingMenu();
|
void _BuildHintingMenu();
|
||||||
void _SetCurrentHinting();
|
void _SetCurrentHinting();
|
||||||
void _SetCurrentAverageWeight();
|
void _SetCurrentAverageWeight();
|
||||||
void _UpdateColors();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float fDivider;
|
float fDivider;
|
||||||
@ -44,7 +43,6 @@ protected:
|
|||||||
BMenuField* fHintingMenuField;
|
BMenuField* fHintingMenuField;
|
||||||
BPopUpMenu* fHintingMenu;
|
BPopUpMenu* fHintingMenu;
|
||||||
BSlider* fAverageWeightControl;
|
BSlider* fAverageWeightControl;
|
||||||
BTextView* fSubpixelAntialiasingDisabledLabel;
|
|
||||||
|
|
||||||
bool fSavedSubpixelAntialiasing;
|
bool fSavedSubpixelAntialiasing;
|
||||||
bool fCurrentSubpixelAntialiasing;
|
bool fCurrentSubpixelAntialiasing;
|
||||||
|
@ -3,10 +3,6 @@ SubDir HAIKU_TOP src preferences appearance ;
|
|||||||
AddSubDirSupportedPlatforms libbe_test ;
|
AddSubDirSupportedPlatforms libbe_test ;
|
||||||
|
|
||||||
UsePrivateHeaders app interface [ FDirName servers app ] ;
|
UsePrivateHeaders app interface [ FDirName servers app ] ;
|
||||||
UseBuildFeatureHeaders freetype ;
|
|
||||||
|
|
||||||
Includes [ FGristFiles AntialiasingSettingsView.cpp ]
|
|
||||||
: [ BuildFeatureAttribute freetype : headers ] ;
|
|
||||||
|
|
||||||
Preference Appearance :
|
Preference Appearance :
|
||||||
APRMain.cpp
|
APRMain.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user