WindDecorator and MacDecorator compile again

* Tile works, Stack is not very usefull at the moment.
* MacDecorator minimize button doesn't work.
This commit is contained in:
Janus
2016-11-16 10:28:42 +01:00
parent 7f07c303ab
commit a55deaea91
6 changed files with 22 additions and 15 deletions
@@ -2,6 +2,7 @@ SubDir HAIKU_TOP src add-ons decorators MacDecorator ;
UseBuildFeatureHeaders freetype ; UseBuildFeatureHeaders freetype ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app stackandtile ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app decorator ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app decorator ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
@@ -43,15 +43,17 @@ MacDecorAddOn::MacDecorAddOn(image_id id, const char* name)
Decorator* Decorator*
MacDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect) MacDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
Desktop* desktop)
{ {
return new (std::nothrow)MacDecorator(settings, rect); return new (std::nothrow)MacDecorator(settings, rect, desktop);
} }
MacDecorator::MacDecorator(DesktopSettings& settings, BRect frame) MacDecorator::MacDecorator(DesktopSettings& settings, BRect frame,
Desktop* desktop)
: :
Decorator(settings, frame), SATDecorator(settings, frame, desktop),
fButtonHighColor((rgb_color) { 232, 232, 232, 255 }), fButtonHighColor((rgb_color) { 232, 232, 232, 255 }),
fButtonLowColor((rgb_color) { 128, 128, 128, 255 }), fButtonLowColor((rgb_color) { 128, 128, 128, 255 }),
fFrameHighColor((rgb_color) { 255, 255, 255, 255 }), fFrameHighColor((rgb_color) { 255, 255, 255, 255 }),
@@ -13,6 +13,7 @@
#include "DecorManager.h" #include "DecorManager.h"
#include "RGBColor.h" #include "RGBColor.h"
#include "SATDecorator.h"
class MacDecorAddOn : public DecorAddOn { class MacDecorAddOn : public DecorAddOn {
@@ -21,14 +22,14 @@ public:
protected: protected:
virtual Decorator* _AllocateDecorator(DesktopSettings& settings, virtual Decorator* _AllocateDecorator(DesktopSettings& settings,
BRect rect); BRect rect, Desktop* desktop);
}; };
class MacDecorator: public Decorator { class MacDecorator: public SATDecorator {
public: public:
MacDecorator(DesktopSettings& settings, MacDecorator(DesktopSettings& settings,
BRect frame); BRect frame, Desktop* desktop);
virtual ~MacDecorator(); virtual ~MacDecorator();
void Draw(BRect updateRect); void Draw(BRect updateRect);
@@ -2,6 +2,7 @@ SubDir HAIKU_TOP src add-ons decorators WinDecorator ;
UseBuildFeatureHeaders freetype ; UseBuildFeatureHeaders freetype ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app stackandtile ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app decorator ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app decorator ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
@@ -43,15 +43,17 @@ WinDecorAddOn::WinDecorAddOn(image_id id, const char* name)
Decorator* Decorator*
WinDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect) WinDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
Desktop* desktop)
{ {
return new (std::nothrow)WinDecorator(settings, rect); return new (std::nothrow)WinDecorator(settings, rect, desktop);
} }
WinDecorator::WinDecorator(DesktopSettings& settings, BRect frame) WinDecorator::WinDecorator(DesktopSettings& settings, BRect frame,
Desktop* desktop)
: :
Decorator(settings, frame), SATDecorator(settings, frame, desktop),
// common colors to both focus and non focus state // common colors to both focus and non focus state
fFrameHighColor((rgb_color){ 255, 255, 255, 255 }), fFrameHighColor((rgb_color){ 255, 255, 255, 255 }),
fFrameMidColor((rgb_color){ 216, 216, 216, 255 }), fFrameMidColor((rgb_color){ 216, 216, 216, 255 }),
@@ -11,8 +11,8 @@
#define WIN_DECORATOR_H #define WIN_DECORATOR_H
#include "Decorator.h"
#include "DecorManager.h" #include "DecorManager.h"
#include "SATDecorator.h"
struct rgb_color; struct rgb_color;
@@ -26,14 +26,14 @@ public:
protected: protected:
virtual Decorator* _AllocateDecorator(DesktopSettings& settings, virtual Decorator* _AllocateDecorator(DesktopSettings& settings,
BRect rect); BRect rect, Desktop* desktop);
}; };
class WinDecorator: public Decorator { class WinDecorator: public SATDecorator {
public: public:
WinDecorator(DesktopSettings& settings, WinDecorator(DesktopSettings& settings,
BRect frame); BRect frame, Desktop* desktop);
~WinDecorator(void); ~WinDecorator(void);
virtual void Draw(BRect updateRect); virtual void Draw(BRect updateRect);