diff options
| -rw-r--r-- | launcher/SwitcherView.cpp | 8 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 4 | ||||
| -rw-r--r-- | unity-shared/LayoutSystem.cpp | 12 | ||||
| -rw-r--r-- | unity-shared/LayoutSystem.h | 4 |
4 files changed, 13 insertions, 15 deletions
diff --git a/launcher/SwitcherView.cpp b/launcher/SwitcherView.cpp index f67c6b3a0..d4d653ea1 100644 --- a/launcher/SwitcherView.cpp +++ b/launcher/SwitcherView.cpp @@ -90,8 +90,7 @@ void SwitcherView::AddProperties(GVariantBuilder* builder) LayoutWindow::List SwitcherView::ExternalTargets () { - LayoutWindow::List result = render_targets_; - return result; + return render_targets_; } void SwitcherView::SetModel(SwitcherModel::Ptr model) @@ -364,16 +363,15 @@ std::list<RenderArg> SwitcherView::RenderArgsFlat(nux::Geometry& background_geo, int padded_tile_size = tile_size + flat_spacing * 2; int max_width = base.width - border_size * 2; - nux::Geometry spread_bounds; int spread_padded_width = 0; if (detail_selection) { - spread_bounds = UpdateRenderTargets (nux::Point (0, 0), current); + nux::Geometry const& spread_bounds = UpdateRenderTargets(nux::Point(), current); // remove extra space consumed by spread spread_padded_width = spread_bounds.width + 100; max_width -= spread_padded_width - tile_size; - int expansion = MAX (0, spread_bounds.height - icon_size); + int expansion = std::max(0, spread_bounds.height - icon_size); background_geo.y -= expansion / 2; background_geo.height += expansion; } diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 740baea2c..6c04ec50b 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -77,7 +77,7 @@ using namespace launcher; using launcher::AbstractLauncherIcon; using launcher::Launcher; using ui::LayoutWindow; -using ui::LayoutWindowList; +using ui::LayoutWindow::List; using util::Timer; DECLARE_LOGGER(logger, "unity.shell.compiz"); @@ -800,7 +800,7 @@ void UnityScreen::paintDisplay() if (switcher_controller_->Visible()) { - LayoutWindowList const& targets = switcher_controller_->ExternalRenderTargets(); + LayoutWindow::List const& targets = switcher_controller_->ExternalRenderTargets(); for (LayoutWindow::Ptr const& target : targets) { diff --git a/unity-shared/LayoutSystem.cpp b/unity-shared/LayoutSystem.cpp index 4b16457b9..f96b40aa1 100644 --- a/unity-shared/LayoutSystem.cpp +++ b/unity-shared/LayoutSystem.cpp @@ -27,7 +27,7 @@ LayoutSystem::LayoutSystem() , max_row_height(400) {} -void LayoutSystem::LayoutWindows(LayoutWindow::List windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) +void LayoutSystem::LayoutWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) { if (windows.empty()) return; @@ -35,7 +35,7 @@ void LayoutSystem::LayoutWindows(LayoutWindow::List windows, nux::Geometry const LayoutGridWindows(windows, max_bounds, final_bounds); } -nux::Size LayoutSystem::GridSizeForWindows(LayoutWindow::List windows, nux::Geometry const& max_bounds) +nux::Size LayoutSystem::GridSizeForWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds) { unsigned count = windows.size(); @@ -70,7 +70,7 @@ nux::Size LayoutSystem::GridSizeForWindows(LayoutWindow::List windows, nux::Geom return nux::Size(width, height); } -nux::Geometry LayoutSystem::CompressAndPadRow (LayoutWindow::List const& windows, nux::Geometry const& max_bounds) +nux::Geometry LayoutSystem::CompressAndPadRow(LayoutWindow::List const& windows, nux::Geometry const& max_bounds) { int total_width = 0; int max_height = 0; @@ -138,7 +138,7 @@ nux::Geometry LayoutSystem::LayoutRow(LayoutWindow::List const& row, nux::Geomet return CompressAndPadRow (row, row_bounds); } -std::vector<LayoutWindow::List> LayoutSystem::GetRows (LayoutWindow::List const& windows, nux::Geometry const& max_bounds) +std::vector<LayoutWindow::List> LayoutSystem::GetRows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds) { std::vector<LayoutWindow::List> rows; @@ -157,7 +157,7 @@ std::vector<LayoutWindow::List> LayoutSystem::GetRows (LayoutWindow::List const& } else { - nux::Size grid_size = GridSizeForWindows (windows, max_bounds); + nux::Size const& grid_size = GridSizeForWindows(windows, max_bounds); int width = grid_size.width; int height = grid_size.height; @@ -218,7 +218,7 @@ std::vector<LayoutWindow::List> LayoutSystem::GetRows (LayoutWindow::List const& return rows; } -void LayoutSystem::LayoutGridWindows (LayoutWindow::List const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) +void LayoutSystem::LayoutGridWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds) { std::vector<LayoutWindow::List> const& rows = GetRows(windows, max_bounds); diff --git a/unity-shared/LayoutSystem.h b/unity-shared/LayoutSystem.h index 548d83be2..5deaabbd5 100644 --- a/unity-shared/LayoutSystem.h +++ b/unity-shared/LayoutSystem.h @@ -55,7 +55,7 @@ public: LayoutSystem(); - void LayoutWindows(LayoutWindow::List windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); + void LayoutWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); protected: void LayoutGridWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds, nux::Geometry& final_bounds); @@ -65,7 +65,7 @@ protected: std::vector<LayoutWindow::List> GetRows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds); - nux::Size GridSizeForWindows(LayoutWindow::List windows, nux::Geometry const& max_bounds); + nux::Size GridSizeForWindows(LayoutWindow::List const& windows, nux::Geometry const& max_bounds); nux::Geometry ScaleBoxIntoBox(nux::Geometry const& bounds, nux::Geometry const& box); }; |
