summaryrefslogtreecommitdiff
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2014-02-22 05:40:53 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2014-02-22 05:40:53 +0100
commit7c16339e770bca17c741b862e672bfc5c9382605 (patch)
tree6b777052d8271ffe0ff2f4db58797bb42995cfd8
parent0d342de2d49ca9ca2d2c91d263d9bfb03d2f7884 (diff)
Remove panel tray in the lockscreen.
(bzr r3566.5.443)
-rw-r--r--panel/PanelView.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
index 21f567e67..93bb869fc 100644
--- a/panel/PanelView.cpp
+++ b/panel/PanelView.cpp
@@ -104,9 +104,12 @@ PanelView::PanelView(MockableBaseWindow* parent, menu::Manager::Ptr const& menus
SetCompositionLayout(layout_);
- tray_ = new PanelTray(monitor_);
- layout_->AddView(tray_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
- AddChild(tray_);
+ if (!lockscreen_mode_)
+ {
+ tray_ = new PanelTray(monitor_);
+ layout_->AddView(tray_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
+ AddChild(tray_);
+ }
indicators_ = new PanelIndicatorsView();
indicators_->SetMonitor(monitor_);
@@ -168,8 +171,12 @@ Window PanelView::GetTrayXid() const
void PanelView::OnDPIChanged()
{
- int height = panel::Style::Instance().PanelHeight(monitor_);
- tray_->SetMinMaxSize(1, height);
+ if (tray_)
+ {
+ int height = panel::Style::Instance().PanelHeight(monitor_);
+ tray_->SetMinMaxSize(1, height);
+ }
+
menu_view_->OnDPIChanged();
}
@@ -567,7 +574,11 @@ void PanelView::PreLayoutManagement()
{
View::PreLayoutManagement();
- int menu_width = GetMaximumWidth() - indicators_->GetBaseWidth() - tray_->GetBaseWidth();
+ int tray_width = 0;
+ if (tray_)
+ tray_width = tray_->GetBaseWidth();
+
+ int menu_width = GetMaximumWidth() - indicators_->GetBaseWidth() - tray_width;
menu_view_->SetMinimumWidth(menu_width);
menu_view_->SetMaximumWidth(menu_width);