* Patch from diver: use vector icons in ColumnListView
* style cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40535 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0812493886
commit
5788aadfe3
@ -51,7 +51,7 @@ const char* ShortcutsSpec::sCommandName;
|
|||||||
|
|
||||||
|
|
||||||
#define ICON_BITMAP_RECT BRect(0.0f, 0.0f, 15.0f, 15.0f)
|
#define ICON_BITMAP_RECT BRect(0.0f, 0.0f, 15.0f, 15.0f)
|
||||||
#define ICON_BITMAP_SPACE B_COLOR_8_BIT
|
#define ICON_BITMAP_SPACE B_RGBA32
|
||||||
|
|
||||||
|
|
||||||
// Returns the (pos)'th char in the string, or '\0' if (pos) if off the end of
|
// Returns the (pos)'th char in the string, or '\0' if (pos) if off the end of
|
||||||
@ -441,7 +441,7 @@ ShortcutsSpec::DrawItemColumn(BView* owner, BRect item_column_rect,
|
|||||||
|
|
||||||
bitmapRegion.Include(item_column_rect);
|
bitmapRegion.Include(item_column_rect);
|
||||||
owner->ConstrainClippingRegion(&bitmapRegion);
|
owner->ConstrainClippingRegion(&bitmapRegion);
|
||||||
owner->SetDrawingMode(B_OP_OVER);
|
owner->SetDrawingMode(B_OP_ALPHA);
|
||||||
|
|
||||||
if ((fCommand != NULL) && (fCommand[0] == '*'))
|
if ((fCommand != NULL) && (fCommand[0] == '*'))
|
||||||
owner->DrawBitmap(sActuatorBitmaps[fBitmapValid ? 1 : 0],
|
owner->DrawBitmap(sActuatorBitmaps[fBitmapValid ? 1 : 0],
|
||||||
|
@ -60,8 +60,9 @@ class CLVContainerView : public BScrollView
|
|||||||
|
|
||||||
|
|
||||||
CLVContainerView::CLVContainerView(char* name, BView* target, uint32 resizingMode, uint32 flags,
|
CLVContainerView::CLVContainerView(char* name, BView* target, uint32 resizingMode, uint32 flags,
|
||||||
bool horizontal, bool vertical, border_style border) :
|
bool horizontal, bool vertical, border_style border)
|
||||||
BScrollView(name,target,resizingMode,flags,horizontal,vertical,border)
|
:
|
||||||
|
BScrollView(name, target, resizingMode, flags, horizontal, vertical, border)
|
||||||
{
|
{
|
||||||
IsBeingDestroyed = false;
|
IsBeingDestroyed = false;
|
||||||
};
|
};
|
||||||
@ -73,35 +74,38 @@ CLVContainerView::~CLVContainerView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ColumnListView::ColumnListView(BRect Frame, BScrollView **ContainerView, const char *Name,
|
ColumnListView::ColumnListView(BRect frame, BScrollView **containerView,
|
||||||
uint32 ResizingMode, uint32 flags, list_view_type Type, bool hierarchical, bool horizontal,
|
const char *name, uint32 resizingMode, uint32 flags, list_view_type type,
|
||||||
bool vertical, border_style border, const BFont *LabelFont)
|
bool hierarchical, bool horizontal, bool vertical, border_style border,
|
||||||
: BListView(Frame,Name,Type,B_FOLLOW_ALL_SIDES,flags|B_PULSE_NEEDED),
|
const BFont *labelFont)
|
||||||
fHierarchical(hierarchical),
|
:
|
||||||
fColumnList(6),
|
BListView(frame, name, type, B_FOLLOW_ALL_SIDES, flags | B_PULSE_NEEDED),
|
||||||
fColumnDisplayList(6),
|
fHierarchical(hierarchical),
|
||||||
fDataWidth(0),
|
fColumnList(6),
|
||||||
fDataHeight(0),
|
fColumnDisplayList(6),
|
||||||
fPageWidth(0),
|
fDataWidth(0),
|
||||||
fPageHeight(0),
|
fDataHeight(0),
|
||||||
fSortKeyList(6),
|
fPageWidth(0),
|
||||||
fRightArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVRightArrowData,false,false),
|
fPageHeight(0),
|
||||||
fDownArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVDownArrowData,false,false),
|
fSortKeyList(6),
|
||||||
fFullItemList(32),
|
fRightArrow(BRect(0, 0, 10, 10), B_RGBA32, CLVRightArrowData, false, false),
|
||||||
_selectedColumn(-1),
|
fDownArrow(BRect(0, 0, 10, 10), B_RGBA32, CLVDownArrowData, false, false),
|
||||||
_editMessage(NULL)
|
fFullItemList(32),
|
||||||
|
_selectedColumn(-1),
|
||||||
|
_editMessage(NULL)
|
||||||
{
|
{
|
||||||
//Create the column titles bar view
|
//Create the column titles bar view
|
||||||
font_height FontAttributes;
|
font_height fontAttributes;
|
||||||
LabelFont->GetHeight(&FontAttributes);
|
labelFont->GetHeight(&fontAttributes);
|
||||||
float fLabelFontHeight = ceil(FontAttributes.ascent) + ceil(FontAttributes.descent);
|
float fLabelFontHeight = ceil(fontAttributes.ascent)
|
||||||
float ColumnLabelViewBottom = Frame.top+1.0+fLabelFontHeight+3.0;
|
+ ceil(fontAttributes.descent);
|
||||||
fColumnLabelView = new CLVColumnLabelView(BRect(Frame.left,Frame.top,Frame.right,
|
float columnLabelViewBottom = frame.top + 1 + fLabelFontHeight + 3;
|
||||||
ColumnLabelViewBottom),this,LabelFont);
|
fColumnLabelView = new CLVColumnLabelView(BRect(frame.left, frame.top,
|
||||||
|
frame.right, columnLabelViewBottom), this, labelFont);
|
||||||
|
|
||||||
//Create the container view
|
//Create the container view
|
||||||
CreateContainer(horizontal,vertical,border,ResizingMode,flags);
|
CreateContainer(horizontal, vertical, border, resizingMode, flags);
|
||||||
*ContainerView = fScrollView;
|
*containerView = fScrollView;
|
||||||
|
|
||||||
//Complete the setup
|
//Complete the setup
|
||||||
UpdateColumnSizesDataRectSizeScrollBars();
|
UpdateColumnSizesDataRectSizeScrollBars();
|
||||||
|
Loading…
Reference in New Issue
Block a user