diff --git a/src/preferences/3drendering/3DRendering.rdef b/src/preferences/3drendering/3DRendering.rdef index f2539b1103..b4aa9086ce 100644 --- a/src/preferences/3drendering/3DRendering.rdef +++ b/src/preferences/3drendering/3DRendering.rdef @@ -17,8 +17,6 @@ resource app_version { long_info = "3D Rendering ©2009-2012 Haiku, Inc." }; -resource(1, "logo.png") #'PNG ' import "logo.png"; - resource vector_icon { $"6E636966060500020006023B10B737F036BA1A993D466848C719BEBE20009192" $"92FFD5D5D5020016023900000000000000003EE0004AE00048E0005EF884C702" diff --git a/src/preferences/3drendering/Jamfile b/src/preferences/3drendering/Jamfile index bed8510826..bc3f07f467 100644 --- a/src/preferences/3drendering/Jamfile +++ b/src/preferences/3drendering/Jamfile @@ -17,7 +17,6 @@ local sources = ExtensionsList.cpp ExtensionsView.cpp InfoView.cpp - LogoView.cpp ; Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; diff --git a/src/preferences/3drendering/LogoView.cpp b/src/preferences/3drendering/LogoView.cpp deleted file mode 100644 index 4095ca3c60..0000000000 --- a/src/preferences/3drendering/LogoView.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2009 Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * Stephan Aßmus - * Artur Wyszynski - */ - -#include "LogoView.h" - -#include -#include -#include -#include -#include - - -LogoView::LogoView() - : - BView("LogoView", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE, NULL), - fLogo(NULL) -{ - SetViewColor(255, 255, 255); - fLogo = BTranslationUtils::GetBitmap(B_PNG_FORMAT, "logo.png"); - if (fLogo) { - SetExplicitMinSize( - BSize(fLogo->Bounds().Width(), fLogo->Bounds().Height() + 6)); - } -} - - -LogoView::~LogoView() -{ - delete fLogo; -} - - -void -LogoView::Draw(BRect update) -{ - if (!fLogo) - return; - - BRect bounds(Bounds()); - BPoint placement; - placement.x = (bounds.left + bounds.right - fLogo->Bounds().Width()) / 2; - placement.y = (bounds.top + bounds.bottom - fLogo->Bounds().Height()) / 2; - - DrawBitmap(fLogo, placement); - rgb_color borderColor = tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), - B_DARKEN_3_TINT); - SetHighColor(borderColor); - StrokeLine(bounds.LeftBottom(), bounds.RightBottom()); -} - - -void -LogoView::GetPreferredSize(float* _width, float* _height) -{ - float width = 0.0; - float height = 0.0; - if (fLogo) { - width = fLogo->Bounds().Width(); - height = fLogo->Bounds().Height(); - } - if (_width) - *_width = width; - if (_height) - *_height = height; -} diff --git a/src/preferences/3drendering/LogoView.h b/src/preferences/3drendering/LogoView.h deleted file mode 100644 index 700f1df653..0000000000 --- a/src/preferences/3drendering/LogoView.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2009 Haiku Inc. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * Stephan Aßmus - * Artur Wyszynski - */ - -#ifndef LOGO_VIEW_H -#define LOGO_VIEW_H - - -#include - -class LogoView : public BView { -public: - LogoView(); - virtual ~LogoView(); - - virtual void Draw(BRect update); - virtual void GetPreferredSize(float* _width, float* _height); - -private: - BBitmap* fLogo; -}; - -#endif /* LOGO_VIEW_H */ diff --git a/src/preferences/3drendering/OpenGLView.cpp b/src/preferences/3drendering/OpenGLView.cpp index fd676b34a3..3b34504568 100644 --- a/src/preferences/3drendering/OpenGLView.cpp +++ b/src/preferences/3drendering/OpenGLView.cpp @@ -13,13 +13,13 @@ #include #include +#include #include #include #include "CapabilitiesView.h" #include "ExtensionsView.h" #include "InfoView.h" -#include "LogoView.h" OpenGLView::OpenGLView() @@ -34,7 +34,21 @@ OpenGLView::OpenGLView() glView->LockGL(); - LogoView *logoView = new LogoView(); + BMenu* menu = new BMenu("Automatic"); + menu->SetRadioMode(true); + menu->SetLabelFromMarked(true); + menu->AddItem(new BMenuItem("Automatic", + new BMessage(MENU_AUTO_MESSAGE))); + menu->AddSeparatorItem(); + menu->AddItem(new BMenuItem("Force Software Rasterizer", + new BMessage(MENU_SWRAST_MESSAGE))); + menu->AddItem(new BMenuItem("Force Gallium Software Pipe", + new BMessage(MENU_SWPIPE_MESSAGE))); + menu->AddItem(new BMenuItem("Force Gallium LLVM Pipe", + new BMessage(MENU_SWLLVM_MESSAGE))); + BMenuField* menuField = new BMenuField("renderer", + "3D Rendering Engine:", menu); + menuField->SetEnabled(false); BTabView *tabView = new BTabView("tab view", B_WIDTH_FROM_LABEL); tabView->AddTab(new InfoView()); @@ -45,12 +59,12 @@ OpenGLView::OpenGLView() GroupLayout()->SetSpacing(0); BLayoutBuilder::Group<>(this) - .SetInsets(0, 0, 0, 0) - .Add(logoView) + .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, + B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) + .Add(menuField) .AddGroup(B_HORIZONTAL) .Add(tabView) - .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, - B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING); + .SetInsets(0, B_USE_DEFAULT_SPACING, 0, 0); } diff --git a/src/preferences/3drendering/OpenGLView.h b/src/preferences/3drendering/OpenGLView.h index 58263df201..479e3cd571 100644 --- a/src/preferences/3drendering/OpenGLView.h +++ b/src/preferences/3drendering/OpenGLView.h @@ -13,6 +13,13 @@ #include + +#define MENU_AUTO_MESSAGE 'auto' +#define MENU_SWRAST_MESSAGE 'swrt' +#define MENU_SWPIPE_MESSAGE 'swpi' +#define MENU_SWLLVM_MESSAGE 'swll' + + class OpenGLView : public BGroupView { public: OpenGLView(); diff --git a/src/preferences/3drendering/logo.png b/src/preferences/3drendering/logo.png deleted file mode 100644 index 6f865484af..0000000000 Binary files a/src/preferences/3drendering/logo.png and /dev/null differ