Added 3D Look Bar and Title Heading.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2809 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
69e09bebe2
commit
d633aff072
@ -52,6 +52,29 @@ void IconView::Draw(BRect updateRect)
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
// AvailableViewArea - Constructor
|
||||
AvailableViewArea::AvailableViewArea (BRect frame) : BView (frame, "AvailableViewArea", B_FOLLOW_ALL_SIDES, B_WILL_DRAW )
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
void AvailableViewArea::Draw(BRect updateRect)
|
||||
{
|
||||
BRect r;
|
||||
r = Bounds();
|
||||
|
||||
// Display the 3D Look Divider Bar
|
||||
SetHighColor(140,140,140,0);
|
||||
StrokeLine(BPoint(0,27),BPoint(490,27));
|
||||
SetHighColor(255,255,255,0);
|
||||
StrokeLine(BPoint(1,28),BPoint(489,28));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
// AudioSettingsView - Constructor
|
||||
AudioSettingsView::AudioSettingsView (BRect frame) : BView (frame, "AudioSettingsView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW )
|
||||
{
|
||||
|
@ -26,6 +26,13 @@ class IconView : public BView
|
||||
virtual void Draw(BRect updateRect);
|
||||
};
|
||||
|
||||
class AvailableViewArea : public BView
|
||||
{
|
||||
public:
|
||||
AvailableViewArea(BRect frame);
|
||||
virtual void Draw(BRect updateRect);
|
||||
};
|
||||
|
||||
class AudioSettingsView : public BView
|
||||
{
|
||||
public:
|
||||
|
@ -91,11 +91,14 @@ void MediaWindow::InitWindow(void)
|
||||
// Create the OutlineView
|
||||
BRect outlinerect(r.left+12,r.top+12,r.left+146,r.bottom-10);
|
||||
BRect AvailableRect(r.left+160,r.top+12,r.right-10,r.bottom-10);
|
||||
BRect AudioMixerRect(r.left+160,r.top+41,r.right-10,r.bottom-10);
|
||||
BRect TitleRect(0,0,140,16);
|
||||
BRect AudioMixerRect(0,30,470,400);
|
||||
BOutlineListView *outline;
|
||||
BListItem *topmenu;
|
||||
BListItem *submenu;
|
||||
BScrollView *outlinesv;
|
||||
BStringView *stvAudioSettings;
|
||||
BStringView *stvAudioMixer;
|
||||
|
||||
outline = new BOutlineListView(outlinerect,"audio_list", B_SINGLE_SELECTION_LIST);
|
||||
outline->AddItem(topmenu = new BStringItem("Audio Settings"));
|
||||
@ -108,15 +111,27 @@ void MediaWindow::InitWindow(void)
|
||||
|
||||
BRect IconRect(0,0,16,16);
|
||||
ptrIconView = new IconView(IconRect);
|
||||
|
||||
topmenu->DrawItem(ptrIconView,IconRect,false);
|
||||
|
||||
// StringViews
|
||||
rgb_color TitleFontColor = { 0,0,0,0 };
|
||||
stvAudioSettings = new BStringView(TitleRect, "AudioSettings", "Audio Settings", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||
stvAudioSettings->SetFont(be_bold_font);
|
||||
stvAudioSettings->SetFontSize(12.0);
|
||||
stvAudioSettings->SetHighColor(TitleFontColor);
|
||||
stvAudioMixer = new BStringView(TitleRect, "AudioMixer", "Audio Mixer", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||
stvAudioMixer->SetFont(be_bold_font);
|
||||
stvAudioMixer->SetFontSize(12.0);
|
||||
stvAudioMixer->SetHighColor(TitleFontColor);
|
||||
|
||||
// Setup the OutlineView
|
||||
outlinesv->SetBorderHighlighted(true);
|
||||
|
||||
// Back and Fore ground Colours
|
||||
outline->SetHighColor(0,0,0,0);
|
||||
outline->SetLowColor(255,255,255,0);
|
||||
|
||||
// Font Settings
|
||||
BFont OutlineFont;
|
||||
OutlineFont.SetSpacing(B_CHAR_SPACING);
|
||||
OutlineFont.SetSize(12);
|
||||
@ -127,8 +142,11 @@ void MediaWindow::InitWindow(void)
|
||||
|
||||
// Add Child(ren)
|
||||
ptrMediaView->AddChild(outlinesv);
|
||||
//AddChild(ptrAudioSettingsView = mew AudioSettingsView(AvailableRect));
|
||||
ptrMediaView->AddChild(ptrAudioMixerView = new AudioMixerView(AudioMixerRect));
|
||||
ptrMediaView->AddChild(ptrAvailableViewArea = new AvailableViewArea(AvailableRect));
|
||||
ptrAvailableViewArea->AddChild(ptrAudioMixerView = new AudioMixerView(AudioMixerRect));
|
||||
|
||||
// Add Child(ren) - Audio Mixer View
|
||||
ptrAvailableViewArea->AddChild(stvAudioMixer);
|
||||
ptrAudioMixerView->AddChild(paramView);
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
@ -18,6 +18,7 @@ class BMultiChannelControl;
|
||||
|
||||
class MediaView;
|
||||
class IconView;
|
||||
class AvailableViewArea;
|
||||
class AudioSettingsView;
|
||||
class AudioMixerView;
|
||||
|
||||
@ -34,6 +35,7 @@ class MediaWindow : public BWindow
|
||||
|
||||
MediaView* ptrMediaView;
|
||||
IconView* ptrIconView;
|
||||
AvailableViewArea* ptrAvailableViewArea;
|
||||
AudioSettingsView* ptrAudioSettingsView;
|
||||
AudioMixerView* ptrAudioMixerView;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user