Convert various more things to using Set*UIColor.
Signed-off-by: Augustin Cavalier <[email protected]> Patches 0038, 0040, 0042-0044 from looncraz, unmodified.
This commit is contained in:
committed by
Augustin Cavalier
parent
f56d45ced4
commit
f696e88a2c
@@ -48,6 +48,10 @@ static struct option const kLongOptions[] = {
|
|||||||
I(navigation_pulse_color, B_NAVIGATION_PULSE_COLOR),
|
I(navigation_pulse_color, B_NAVIGATION_PULSE_COLOR),
|
||||||
I(shine_color, B_SHINE_COLOR),
|
I(shine_color, B_SHINE_COLOR),
|
||||||
I(shadow_color, B_SHADOW_COLOR),
|
I(shadow_color, B_SHADOW_COLOR),
|
||||||
|
I(link_text_color, B_LINK_TEXT_COLOR),
|
||||||
|
I(link_hover_color, B_LINK_HOVER_COLOR),
|
||||||
|
I(link_visited_color, B_LINK_VISITED_COLOR),
|
||||||
|
I(link_active_color, B_LINK_ACTIVE_COLOR),
|
||||||
I(menu_background_color, B_MENU_BACKGROUND_COLOR),
|
I(menu_background_color, B_MENU_BACKGROUND_COLOR),
|
||||||
I(menu_selected_background_color, B_MENU_SELECTED_BACKGROUND_COLOR),
|
I(menu_selected_background_color, B_MENU_SELECTED_BACKGROUND_COLOR),
|
||||||
I(menu_item_text_color, B_MENU_ITEM_TEXT_COLOR),
|
I(menu_item_text_color, B_MENU_ITEM_TEXT_COLOR),
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ ConnectionView::ConnectionView(BRect rect, const BString& interfaceName)
|
|||||||
fInterfaceName(interfaceName),
|
fInterfaceName(interfaceName),
|
||||||
fKeepLabel(false)
|
fKeepLabel(false)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
|
||||||
rect = Bounds();
|
rect = Bounds();
|
||||||
rect.InsetBy(5, 5);
|
rect.InsetBy(5, 5);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ PPPStatusView::PPPStatusView(BRect rect, ppp_interface_id id)
|
|||||||
: BView(rect, "PPPStatusView", B_FOLLOW_NONE, B_PULSE_NEEDED),
|
: BView(rect, "PPPStatusView", B_FOLLOW_NONE, B_PULSE_NEEDED),
|
||||||
fInterface(id)
|
fInterface(id)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
|
||||||
rect = Bounds();
|
rect = Bounds();
|
||||||
rect.InsetBy(5, 5);
|
rect.InsetBy(5, 5);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ PasswordWindow::PasswordWindow()
|
|||||||
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES)
|
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES)
|
||||||
{
|
{
|
||||||
BView* topView = new BView(Bounds(), "topView", B_FOLLOW_ALL, B_WILL_DRAW);
|
BView* topView = new BView(Bounds(), "topView", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
topView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
AddChild(topView);
|
AddChild(topView);
|
||||||
|
|
||||||
BRect bounds(Bounds());
|
BRect bounds(Bounds());
|
||||||
|
|||||||
@@ -7,39 +7,34 @@
|
|||||||
|
|
||||||
#include <ConnectionIncoming.h>
|
#include <ConnectionIncoming.h>
|
||||||
|
|
||||||
|
|
||||||
#define B_PULSES_BY_SECOND(x) (2*x)
|
#define B_PULSES_BY_SECOND(x) (2*x)
|
||||||
|
|
||||||
|
|
||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
ConnectionView::ConnectionView(BRect frame, const char *name): BView(BRect(0, 0, 400, 400), "MyViewName",
|
|
||||||
B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
ConnectionView::ConnectionView(BRect frame, const char *name)
|
||||||
B_WILL_DRAW | B_PULSE_NEEDED)
|
:
|
||||||
|
BView(BRect(0, 0, 400, 400), "MyViewName", B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||||
|
B_WILL_DRAW | B_PULSE_NEEDED)
|
||||||
{
|
{
|
||||||
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConnectionView::~ConnectionView()
|
ConnectionView::~ConnectionView()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConnectionView::MessageReceived(BMessage *message)
|
void ConnectionView::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
switch(message->what)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConnectionView::Draw(BRect update)
|
void ConnectionView::Draw(BRect update)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -55,12 +50,14 @@ void ConnectionView::Pulse()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//#pragma mark -
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
|
||||||
ConnectionIncoming::ConnectionIncoming(RemoteDevice* rDevice)
|
ConnectionIncoming::ConnectionIncoming(RemoteDevice* rDevice)
|
||||||
: BWindow(BRect(700, 100, 900, 150), "Connection completed",
|
:
|
||||||
B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
BWindow(BRect(700, 100, 900, 150), "Connection completed",
|
||||||
B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
|
B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
||||||
|
B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
|
||||||
{
|
{
|
||||||
_ConnectionView = new ConnectionView(BRect(0, 0, 400, 400),"mViewName");
|
_ConnectionView = new ConnectionView(BRect(0, 0, 400, 400),"mViewName");
|
||||||
|
|
||||||
@@ -70,18 +67,11 @@ ConnectionIncoming::ConnectionIncoming(RemoteDevice* rDevice)
|
|||||||
|
|
||||||
ConnectionIncoming::~ConnectionIncoming()
|
ConnectionIncoming::~ConnectionIncoming()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConnectionIncoming::MessageReceived(BMessage *message)
|
void ConnectionIncoming::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
switch(message->what)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -90,4 +80,5 @@ bool ConnectionIncoming::QuitRequested()
|
|||||||
return BWindow::QuitRequested();
|
return BWindow::QuitRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ FileControl::FileControl(const char* name, const char* label,
|
|||||||
:
|
:
|
||||||
BView(name, 0)
|
BView(name, 0)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
fText = new BTextControl("file_path", label, pathOfFile, NULL);
|
fText = new BTextControl("file_path", label, pathOfFile, NULL);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ MailProtocolConfigView::MailProtocolConfigView(uint32 optionsMask)
|
|||||||
fRemoveFromServerCheckBox(NULL),
|
fRemoveFromServerCheckBox(NULL),
|
||||||
fBodyDownloadConfig(NULL)
|
fBodyDownloadConfig(NULL)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
|
||||||
BGridLayout* layout = new BGridLayout(0.f);
|
BGridLayout* layout = new BGridLayout(0.f);
|
||||||
SetLayout(layout);
|
SetLayout(layout);
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ BCalendarView::AttachedToWindow()
|
|||||||
if (!Messenger().IsValid())
|
if (!Messenger().IsValid())
|
||||||
SetTarget(Window(), NULL);
|
SetTarget(Window(), NULL);
|
||||||
|
|
||||||
SetViewColor(ui_color(B_LIST_BACKGROUND_COLOR));
|
SetViewUIColor(B_LIST_BACKGROUND_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,15 +79,10 @@ BIconButton::MessageReceived(BMessage* message)
|
|||||||
void
|
void
|
||||||
BIconButton::AttachedToWindow()
|
BIconButton::AttachedToWindow()
|
||||||
{
|
{
|
||||||
rgb_color background = B_TRANSPARENT_COLOR;
|
AdoptParentColors();
|
||||||
if (BView* parent = Parent()) {
|
|
||||||
background = parent->ViewColor();
|
if (ViewUIColor() != B_NO_COLOR)
|
||||||
if (background == B_TRANSPARENT_COLOR)
|
SetLowUIColor(ViewUIColor());
|
||||||
background = parent->LowColor();
|
|
||||||
}
|
|
||||||
if (background == B_TRANSPARENT_COLOR)
|
|
||||||
background = ui_color(B_PANEL_BACKGROUND_COLOR);
|
|
||||||
SetLowColor(background);
|
|
||||||
|
|
||||||
SetTarget(fTargetCache);
|
SetTarget(fTargetCache);
|
||||||
if (!Target())
|
if (!Target())
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ IconView::IconView(icon_size iconSize)
|
|||||||
fIconBitmap(new BBitmap(BRect(iconSize), B_RGBA32)),
|
fIconBitmap(new BBitmap(BRect(iconSize), B_RGBA32)),
|
||||||
fDrawIcon(false)
|
fDrawIcon(false)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ BALMLayoutBuilder::BALMLayoutBuilder(BWindow* window, float hSpacing,
|
|||||||
fLayout = new BALMLayout(hSpacing, vSpacing, friendLayout);
|
fLayout = new BALMLayout(hSpacing, vSpacing, friendLayout);
|
||||||
window->SetLayout(fLayout);
|
window->SetLayout(fLayout);
|
||||||
|
|
||||||
fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
fLayout->Owner()->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
// TODO: we get a white background if we don't do this
|
// TODO: we get a white background if we don't do this
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ BALMLayoutBuilder::BALMLayoutBuilder(BWindow* window, BALMLayout* layout)
|
|||||||
fLayout = layout;
|
fLayout = layout;
|
||||||
window->SetLayout(fLayout);
|
window->SetLayout(fLayout);
|
||||||
|
|
||||||
fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
fLayout->Owner()->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
// TODO: we get a white background if we don't do this
|
// TODO: we get a white background if we don't do this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ AboutBoxView::AboutBoxView(BRect rect, const char *driver_name, const char *vers
|
|||||||
fDriverName = driver_name;
|
fDriverName = driver_name;
|
||||||
fVersion = version;
|
fVersion = version;
|
||||||
fCopyright = copyright;
|
fCopyright = copyright;
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
SetDrawingMode(B_OP_SELECT);
|
SetDrawingMode(B_OP_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ HalftoneView::HalftoneView(BRect frame, const char* name, uint32 resizeMask,
|
|||||||
:
|
:
|
||||||
BView(frame, name, resizeMask, flags)
|
BView(frame, name, resizeMask, flags)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
|
||||||
BRect r(frame);
|
BRect r(frame);
|
||||||
float size, max;
|
float size, max;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ JobSetupView::JobSetupView(JobData* jobData, PrinterData* printerData,
|
|||||||
fOddNumberedPages(NULL),
|
fOddNumberedPages(NULL),
|
||||||
fEvenNumberedPages(NULL)
|
fEvenNumberedPages(NULL)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ PageSetupView::PageSetupView(JobData *job_data, PrinterData *printer_data,
|
|||||||
, fPrinterData(printer_data)
|
, fPrinterData(printer_data)
|
||||||
, fPrinterCap(printer_cap)
|
, fPrinterCap(printer_cap)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
PageSetupView::~PageSetupView()
|
PageSetupView::~PageSetupView()
|
||||||
|
|||||||
@@ -882,7 +882,7 @@ PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)
|
|||||||
fPreview = new PreviewView(jobFile, bounds);
|
fPreview = new PreviewView(jobFile, bounds);
|
||||||
fPreviewScroller = new BScrollView("PreviewScroller", fPreview, B_FOLLOW_ALL,
|
fPreviewScroller = new BScrollView("PreviewScroller", fPreview, B_FOLLOW_ALL,
|
||||||
B_FRAME_EVENTS, true, true, B_FANCY_BORDER);
|
B_FRAME_EVENTS, true, true, B_FANCY_BORDER);
|
||||||
fPreviewScroller->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
fPreviewScroller->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
panel->AddChild(fPreviewScroller);
|
panel->AddChild(fPreviewScroller);
|
||||||
|
|
||||||
if (fPreview->InitCheck() == B_OK) {
|
if (fPreview->InitCheck() == B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user