OverlayImage: Apply coding style

Change-Id: Id35e8eeaf0735210cbe14d618c59d5ef8dc90a09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7114
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Humdinger 2023-11-19 09:01:47 +01:00 committed by waddlesplash
parent 2283561d60
commit 2de4cba264
3 changed files with 17 additions and 17 deletions

View File

@ -16,9 +16,10 @@
OverlayApp::OverlayApp()
: BApplication(kAppSignature)
:
BApplication(kAppSignature)
{
OverlayWindow *theWindow = new OverlayWindow();
OverlayWindow* theWindow = new OverlayWindow();
theWindow->Show();
}
@ -28,5 +29,5 @@ main()
{
OverlayApp theApp;
theApp.Run();
return (0);
return 0;
}

View File

@ -36,7 +36,7 @@ OverlayView::OverlayView(BRect frame)
frame.left = frame.right - kDraggerSize;
frame.top = frame.bottom - kDraggerSize;
BDragger *dragger = new BDragger(frame, this, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
BDragger* dragger = new BDragger(frame, this, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
AddChild(dragger);
SetViewColor(B_TRANSPARENT_COLOR);
@ -59,7 +59,7 @@ OverlayView::OverlayView(BRect frame)
}
OverlayView::OverlayView(BMessage *archive)
OverlayView::OverlayView(BMessage* archive)
:
BView(archive)
{
@ -86,7 +86,7 @@ OverlayView::Draw(BRect)
void
OverlayView::MessageReceived(BMessage *msg)
OverlayView::MessageReceived(BMessage* msg)
{
switch (msg->what) {
case B_SIMPLE_DATA:
@ -126,8 +126,7 @@ OverlayView::MessageReceived(BMessage *msg)
case B_COLORS_UPDATED:
{
rgb_color color;
if (msg->FindColor(ui_color_name(B_PANEL_TEXT_COLOR), &color)
== B_OK)
if (msg->FindColor(ui_color_name(B_PANEL_TEXT_COLOR), &color) == B_OK)
fText->SetFontAndColor(be_plain_font, B_FONT_ALL, &color);
break;
}
@ -138,14 +137,15 @@ OverlayView::MessageReceived(BMessage *msg)
}
BArchivable *OverlayView::Instantiate(BMessage *data)
BArchivable*
OverlayView::Instantiate(BMessage* data)
{
return new OverlayView(data);
}
status_t
OverlayView::Archive(BMessage *archive, bool deep) const
OverlayView::Archive(BMessage* archive, bool deep) const
{
BView::Archive(archive, deep);
@ -157,7 +157,6 @@ OverlayView::Archive(BMessage *archive, bool deep) const
fBitmap->Archive(archive);
fBitmap->Unlock();
}
//archive->PrintToStream();
return B_OK;
}

View File

@ -11,8 +11,8 @@
* Humdinger <humdingerb@gmail.com>
*/
#include "OverlayView.h"
#include "OverlayWindow.h"
#include "OverlayView.h"
#include <Application.h>
#include <Catalog.h>
@ -23,15 +23,15 @@
#define B_TRANSLATION_CONTEXT "Main window"
OverlayWindow::OverlayWindow()
OverlayWindow::OverlayWindow()
:
BWindow(BRect(50, 50, 500, 200), B_TRANSLATE_SYSTEM_NAME("OverlayImage"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
BWindow(BRect(50, 50, 500, 200), B_TRANSLATE_SYSTEM_NAME("OverlayImage"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
{
OverlayView *replView = new OverlayView(Bounds());
OverlayView* replView = new OverlayView(Bounds());
AddChild(replView);
BView *bgView = new BView(Bounds(), "bgView", B_FOLLOW_ALL, B_WILL_DRAW);
BView* bgView = new BView(Bounds(), "bgView", B_FOLLOW_ALL, B_WILL_DRAW);
bgView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
AddChild(bgView);
}