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(shine_color, B_SHINE_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_selected_background_color, B_MENU_SELECTED_BACKGROUND_COLOR),
|
||||
I(menu_item_text_color, B_MENU_ITEM_TEXT_COLOR),
|
||||
|
||||
@@ -57,7 +57,7 @@ ConnectionView::ConnectionView(BRect rect, const BString& interfaceName)
|
||||
fInterfaceName(interfaceName),
|
||||
fKeepLabel(false)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
|
||||
rect = Bounds();
|
||||
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),
|
||||
fInterface(id)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
|
||||
rect = Bounds();
|
||||
rect.InsetBy(5, 5);
|
||||
|
||||
@@ -33,7 +33,7 @@ PasswordWindow::PasswordWindow()
|
||||
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES)
|
||||
{
|
||||
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);
|
||||
|
||||
BRect bounds(Bounds());
|
||||
|
||||
@@ -7,39 +7,34 @@
|
||||
|
||||
#include <ConnectionIncoming.h>
|
||||
|
||||
|
||||
#define B_PULSES_BY_SECOND(x) (2*x)
|
||||
|
||||
|
||||
namespace Bluetooth {
|
||||
|
||||
ConnectionView::ConnectionView(BRect frame, const char *name): BView(BRect(0, 0, 400, 400), "MyViewName",
|
||||
B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
B_WILL_DRAW | B_PULSE_NEEDED)
|
||||
|
||||
ConnectionView::ConnectionView(BRect frame, const char *name)
|
||||
:
|
||||
BView(BRect(0, 0, 400, 400), "MyViewName", B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
B_WILL_DRAW | B_PULSE_NEEDED)
|
||||
{
|
||||
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
}
|
||||
|
||||
|
||||
ConnectionView::~ConnectionView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ConnectionView::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch(message->what)
|
||||
{
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ConnectionView::Draw(BRect update)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +50,14 @@ void ConnectionView::Pulse()
|
||||
}
|
||||
|
||||
|
||||
//#pragma mark -
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
ConnectionIncoming::ConnectionIncoming(RemoteDevice* rDevice)
|
||||
: BWindow(BRect(700, 100, 900, 150), "Connection completed",
|
||||
B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
||||
B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
|
||||
:
|
||||
BWindow(BRect(700, 100, 900, 150), "Connection completed",
|
||||
B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
||||
B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
|
||||
{
|
||||
_ConnectionView = new ConnectionView(BRect(0, 0, 400, 400),"mViewName");
|
||||
|
||||
@@ -70,18 +67,11 @@ ConnectionIncoming::ConnectionIncoming(RemoteDevice* rDevice)
|
||||
|
||||
ConnectionIncoming::~ConnectionIncoming()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ConnectionIncoming::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch(message->what)
|
||||
{
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,4 +80,5 @@ bool ConnectionIncoming::QuitRequested()
|
||||
return BWindow::QuitRequested();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ FileControl::FileControl(const char* name, const char* label,
|
||||
:
|
||||
BView(name, 0)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||
|
||||
fText = new BTextControl("file_path", label, pathOfFile, NULL);
|
||||
|
||||
@@ -125,7 +125,7 @@ MailProtocolConfigView::MailProtocolConfigView(uint32 optionsMask)
|
||||
fRemoveFromServerCheckBox(NULL),
|
||||
fBodyDownloadConfig(NULL)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
|
||||
BGridLayout* layout = new BGridLayout(0.f);
|
||||
SetLayout(layout);
|
||||
|
||||
@@ -158,7 +158,7 @@ BCalendarView::AttachedToWindow()
|
||||
if (!Messenger().IsValid())
|
||||
SetTarget(Window(), NULL);
|
||||
|
||||
SetViewColor(ui_color(B_LIST_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_LIST_BACKGROUND_COLOR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -79,15 +79,10 @@ BIconButton::MessageReceived(BMessage* message)
|
||||
void
|
||||
BIconButton::AttachedToWindow()
|
||||
{
|
||||
rgb_color background = B_TRANSPARENT_COLOR;
|
||||
if (BView* parent = Parent()) {
|
||||
background = parent->ViewColor();
|
||||
if (background == B_TRANSPARENT_COLOR)
|
||||
background = parent->LowColor();
|
||||
}
|
||||
if (background == B_TRANSPARENT_COLOR)
|
||||
background = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||
SetLowColor(background);
|
||||
AdoptParentColors();
|
||||
|
||||
if (ViewUIColor() != B_NO_COLOR)
|
||||
SetLowUIColor(ViewUIColor());
|
||||
|
||||
SetTarget(fTargetCache);
|
||||
if (!Target())
|
||||
|
||||
@@ -23,7 +23,7 @@ IconView::IconView(icon_size iconSize)
|
||||
fIconBitmap(new BBitmap(BRect(iconSize), B_RGBA32)),
|
||||
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);
|
||||
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
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ BALMLayoutBuilder::BALMLayoutBuilder(BWindow* window, BALMLayout* layout)
|
||||
fLayout = layout;
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ AboutBoxView::AboutBoxView(BRect rect, const char *driver_name, const char *vers
|
||||
fDriverName = driver_name;
|
||||
fVersion = version;
|
||||
fCopyright = copyright;
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
SetDrawingMode(B_OP_SELECT);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ HalftoneView::HalftoneView(BRect frame, const char* name, uint32 resizeMask,
|
||||
:
|
||||
BView(frame, name, resizeMask, flags)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
|
||||
BRect r(frame);
|
||||
float size, max;
|
||||
|
||||
@@ -160,7 +160,7 @@ JobSetupView::JobSetupView(JobData* jobData, PrinterData* printerData,
|
||||
fOddNumberedPages(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)
|
||||
, fPrinterCap(printer_cap)
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
}
|
||||
|
||||
PageSetupView::~PageSetupView()
|
||||
|
||||
@@ -882,7 +882,7 @@ PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)
|
||||
fPreview = new PreviewView(jobFile, bounds);
|
||||
fPreviewScroller = new BScrollView("PreviewScroller", fPreview, B_FOLLOW_ALL,
|
||||
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);
|
||||
|
||||
if (fPreview->InitCheck() == B_OK) {
|
||||
|
||||
Reference in New Issue
Block a user