mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Allow category list width to grow dynamically up to 40 columns.
This commit is contained in:
parent
e31bbb9b56
commit
7aa27a231c
@ -44,8 +44,8 @@
|
||||
|
||||
using namespace musik::core::library::constants;
|
||||
|
||||
#define CATEGORY_WIDTH 25
|
||||
#define DEFAULT_CATEGORY constants::Track::ARTIST
|
||||
static size_t MAX_CATEGORY_WIDTH = 40;
|
||||
|
||||
using namespace musik::core;
|
||||
using namespace musik::core::audio;
|
||||
@ -78,10 +78,12 @@ void BrowseLayout::Layout() {
|
||||
|
||||
this->MoveAndResize(x, y, cx, cy);
|
||||
|
||||
this->categoryList->MoveAndResize(x, y, CATEGORY_WIDTH, cy);
|
||||
size_t categoryWidth = std::min(MAX_CATEGORY_WIDTH, cx / 4);
|
||||
|
||||
this->categoryList->MoveAndResize(x, y, categoryWidth, cy);
|
||||
|
||||
this->trackList->MoveAndResize(
|
||||
x + CATEGORY_WIDTH, y, cx - CATEGORY_WIDTH, cy);
|
||||
x + categoryWidth, y, cx - categoryWidth, cy);
|
||||
|
||||
this->categoryList->SetFocusOrder(0);
|
||||
this->trackList->SetFocusOrder(1);
|
||||
|
Loading…
Reference in New Issue
Block a user