glinfo: Cosmetic adjustments
* Remove my dropdown to select renderer We can accomplish this through a config file read by the opengl kit render roster * Reorder info text * Adjust tab view column sizes * Adjust window height
This commit is contained in:
@@ -35,7 +35,7 @@ CapabilitiesView::CapabilitiesView()
|
|||||||
{
|
{
|
||||||
// add the columns
|
// add the columns
|
||||||
|
|
||||||
float capabilityColWidth = this->StringWidth("M") * 23;
|
float capabilityColWidth = this->StringWidth("M") * 28;
|
||||||
|
|
||||||
fCapabilityColumn = new BStringColumn(B_TRANSLATE("Capability"),
|
fCapabilityColumn = new BStringColumn(B_TRANSLATE("Capability"),
|
||||||
capabilityColWidth, capabilityColWidth - 20.0,
|
capabilityColWidth, capabilityColWidth - 20.0,
|
||||||
@@ -44,7 +44,7 @@ CapabilitiesView::CapabilitiesView()
|
|||||||
fCapabilitiesList->SetSortingEnabled(true);
|
fCapabilitiesList->SetSortingEnabled(true);
|
||||||
fCapabilitiesList->SetSortColumn(fCapabilityColumn, true, true);
|
fCapabilitiesList->SetSortColumn(fCapabilityColumn, true, true);
|
||||||
|
|
||||||
float valueColWidth = this->StringWidth("M") * 6;
|
float valueColWidth = this->StringWidth("M") * 8;
|
||||||
|
|
||||||
fValueColumn = new BStringColumn(B_TRANSLATE("Value"), valueColWidth,
|
fValueColumn = new BStringColumn(B_TRANSLATE("Value"), valueColWidth,
|
||||||
valueColWidth, valueColWidth, B_TRUNCATE_MIDDLE);
|
valueColWidth, valueColWidth, B_TRUNCATE_MIDDLE);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ExtensionsView::ExtensionsView()
|
|||||||
{
|
{
|
||||||
// add the columns
|
// add the columns
|
||||||
|
|
||||||
float availableColWidth = this->StringWidth("M") * 27;
|
float availableColWidth = this->StringWidth("M") * 28;
|
||||||
|
|
||||||
fAvailableColumn = new BStringColumn(B_TRANSLATE("Available extensions"),
|
fAvailableColumn = new BStringColumn(B_TRANSLATE("Available extensions"),
|
||||||
availableColWidth, availableColWidth, availableColWidth,
|
availableColWidth, availableColWidth, availableColWidth,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ GearsView::Draw(BRect updateRect)
|
|||||||
|
|
||||||
SetDrawingMode(B_OP_ALPHA);
|
SetDrawingMode(B_OP_ALPHA);
|
||||||
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
||||||
DrawBitmapAsync(fGears, BPoint(5.0, 18.0));
|
DrawBitmapAsync(fGears, BPoint(5.0, 10.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "InfoView.h"
|
#include "InfoView.h"
|
||||||
|
|
||||||
|
#include <Box.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <ControlLook.h>
|
#include <ControlLook.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
@@ -32,15 +33,6 @@ const BAlignment kLabelAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET);
|
|||||||
const BAlignment kValueAlignment(B_ALIGN_RIGHT, B_ALIGN_VERTICAL_UNSET);
|
const BAlignment kValueAlignment(B_ALIGN_RIGHT, B_ALIGN_VERTICAL_UNSET);
|
||||||
|
|
||||||
|
|
||||||
// <bold>Render name</bold>
|
|
||||||
// Vendor Name GL Version
|
|
||||||
// GLU version GLUT API version
|
|
||||||
//
|
|
||||||
// example:
|
|
||||||
// Software rasterizer for X86/MMX/SSE2
|
|
||||||
// Mesa Project 2.1 Mesa 8.1-devel (git-2402c0)
|
|
||||||
// GLU 1.3 GLUT API 5
|
|
||||||
|
|
||||||
InfoView::InfoView()
|
InfoView::InfoView()
|
||||||
:
|
:
|
||||||
BGroupView(B_TRANSLATE("Information"), B_HORIZONTAL)
|
BGroupView(B_TRANSLATE("Information"), B_HORIZONTAL)
|
||||||
@@ -52,32 +44,25 @@ InfoView::InfoView()
|
|||||||
|
|
||||||
BStringView* vendorNameView = new BStringView(NULL,
|
BStringView* vendorNameView = new BStringView(NULL,
|
||||||
(const char*)glGetString(GL_VENDOR));
|
(const char*)glGetString(GL_VENDOR));
|
||||||
vendorNameView->SetExplicitAlignment(kLabelAlignment);
|
vendorNameView->SetExplicitAlignment(kLabelAlignment);
|
||||||
|
|
||||||
BStringView* glVersionView = new BStringView(NULL,
|
BStringView* glVersionView = new BStringView(NULL,
|
||||||
(const char*)glGetString(GL_VERSION));
|
(const char*)glGetString(GL_VERSION));
|
||||||
glVersionView->SetExplicitAlignment(kLabelAlignment);
|
glVersionView->SetExplicitAlignment(kLabelAlignment);
|
||||||
|
|
||||||
BString gluString("GLU ");
|
BString apiString("GLU ");
|
||||||
gluString << (const char*)gluGetString(GLU_VERSION);
|
apiString << (const char*)gluGetString(GLU_VERSION);
|
||||||
BStringView* gluVersionView = new BStringView(NULL, gluString.String());
|
apiString << ", GLUT ";
|
||||||
gluVersionView->SetExplicitAlignment(kLabelAlignment);
|
apiString << (int32)GLUT_API_VERSION;
|
||||||
|
BStringView* apiVersionView = new BStringView(NULL, apiString.String());
|
||||||
BString glutAPIString("GLUT API ");
|
apiVersionView->SetExplicitAlignment(kLabelAlignment);
|
||||||
glutAPIString << (int32)GLUT_API_VERSION;
|
|
||||||
BStringView* glutVersionView = new BStringView(NULL,
|
|
||||||
glutAPIString.String());
|
|
||||||
glutVersionView->SetExplicitAlignment(kLabelAlignment);
|
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(this)
|
BLayoutBuilder::Group<>(this)
|
||||||
.AddGroup(B_VERTICAL, 0)
|
.AddGroup(B_VERTICAL, 0)
|
||||||
.Add(rendererView)
|
.Add(rendererView)
|
||||||
.Add(BGridLayoutBuilder(0, 0)
|
.Add(vendorNameView)
|
||||||
.Add(vendorNameView, 0, 0)
|
.Add(glVersionView)
|
||||||
.Add(glVersionView, 1, 0)
|
.Add(apiVersionView)
|
||||||
.Add(gluVersionView, 0, 1)
|
|
||||||
.Add(glutVersionView, 1, 1)
|
|
||||||
)
|
|
||||||
.End();
|
.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,23 +44,7 @@ OpenGLView::OpenGLView()
|
|||||||
|
|
||||||
glView->LockGL();
|
glView->LockGL();
|
||||||
|
|
||||||
BPopUpMenu* menu = new BPopUpMenu(B_TRANSLATE("Automatic"), true, true);
|
float tabViewWidth = this->StringWidth("M") * 42;
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Automatic"),
|
|
||||||
new BMessage(MENU_AUTO_MESSAGE)));
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Software Rasterizer"),
|
|
||||||
new BMessage(MENU_SWRAST_MESSAGE)));
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Gallium Software Pipe"),
|
|
||||||
new BMessage(MENU_SWPIPE_MESSAGE)));
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Gallium LLVM Pipe"),
|
|
||||||
new BMessage(MENU_SWLLVM_MESSAGE)));
|
|
||||||
BMenuField* menuField = new BMenuField("renderer",
|
|
||||||
B_TRANSLATE("3D Rendering Engine:"), menu);
|
|
||||||
menuField->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
|
||||||
// TODO: Set current Renderer
|
|
||||||
menuField->SetEnabled(false);
|
|
||||||
|
|
||||||
float tabViewWidth = this->StringWidth("M") * 36;
|
|
||||||
float tabViewHeight = this->StringWidth("M") * 16;
|
float tabViewHeight = this->StringWidth("M") * 16;
|
||||||
|
|
||||||
BTabView *tabView = new BTabView("tab view", B_WIDTH_FROM_LABEL);
|
BTabView *tabView = new BTabView("tab view", B_WIDTH_FROM_LABEL);
|
||||||
@@ -77,7 +61,6 @@ OpenGLView::OpenGLView()
|
|||||||
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
|
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
|
||||||
.SetInsets(0, B_USE_DEFAULT_SPACING,
|
.SetInsets(0, B_USE_DEFAULT_SPACING,
|
||||||
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
|
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
|
||||||
.Add(menuField)
|
|
||||||
.Add(new InfoView())
|
.Add(new InfoView())
|
||||||
.Add(tabView)
|
.Add(tabView)
|
||||||
.End()
|
.End()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
OpenGLWindow::OpenGLWindow()
|
OpenGLWindow::OpenGLWindow()
|
||||||
:
|
:
|
||||||
BWindow(BRect(50, 50, 300, 300),
|
BWindow(BRect(50, 50, 300, 400),
|
||||||
B_TRANSLATE_SYSTEM_NAME("GL Info"), B_TITLED_WINDOW,
|
B_TRANSLATE_SYSTEM_NAME("GL Info"), B_TITLED_WINDOW,
|
||||||
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE
|
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS)
|
| B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
|
|||||||
Reference in New Issue
Block a user