summaryrefslogtreecommitdiff
path: root/dash/previews
diff options
authorNick Dedekind <nicholas.dedekind@gmail.com>2012-08-09 17:02:52 +0100
committerNick Dedekind <nicholas.dedekind@gmail.com>2012-08-09 17:02:52 +0100
commite75e3280981ce67174ab61b5275716dbeb79f27a (patch)
tree4f84ecb64c3004845e959f437574427e3dc65229 /dash/previews
parent36d5f5bd7de1457d455d9d6239766909586d0b4c (diff)
Fixed layout loop in music preview
(bzr r2419.4.54)
Diffstat (limited to 'dash/previews')
-rw-r--r--dash/previews/MusicPreview.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/dash/previews/MusicPreview.cpp b/dash/previews/MusicPreview.cpp
index ba0dd1ed1..a4772aa7a 100644
--- a/dash/previews/MusicPreview.cpp
+++ b/dash/previews/MusicPreview.cpp
@@ -278,17 +278,15 @@ void MusicPreview::PreLayoutManagement()
geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth());
image_->SetMinMaxSize(geo_art.width, geo_art.height);
- full_data_layout_->SetMinMaxSize(geo.width - geo_art.width - style.GetPanelSplitWidth(), geo.height);
+ int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin());
- // int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin());
+ if (title_) { title_->SetMaximumWidth(details_width); }
+ if (subtitle_) { subtitle_->SetMaximumWidth(details_width); }
- // if (title_) { title_->SetMaximumWidth(details_width); }
- // if (subtitle_) { subtitle_->SetMaximumWidth(details_width); }
-
- // for (nux::AbstractButton* button : action_buttons_)
- // {
- // button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight());
- // }
+ for (nux::AbstractButton* button : action_buttons_)
+ {
+ button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight());
+ }
Preview::PreLayoutManagement();
}