diff options
Diffstat (limited to 'panel')
| -rw-r--r-- | panel/PanelIndicatorEntryView.cpp | 3 | ||||
| -rw-r--r-- | panel/PanelMenuView.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/panel/PanelIndicatorEntryView.cpp b/panel/PanelIndicatorEntryView.cpp index d61d8282d..7354d6083 100644 --- a/panel/PanelIndicatorEntryView.cpp +++ b/panel/PanelIndicatorEntryView.cpp @@ -429,7 +429,6 @@ void PanelIndicatorEntryView::Refresh() unsigned int width = 0; unsigned int icon_width = 0; unsigned int height = panel::Style::Instance().panel_height; - unsigned int text_width = 0; // First lets figure out our size if (pixbuf && IsIconVisible()) @@ -484,7 +483,7 @@ void PanelIndicatorEntryView::Refresh() pango_layout_context_changed(layout); pango_layout_get_extents(layout, nullptr, &log_rect); - text_width = log_rect.width / PANGO_SCALE; + unsigned int text_width = log_rect.width / PANGO_SCALE; if (icon_width) width += spacing_; diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp index 0b90f67c7..3d75c0afc 100644 --- a/panel/PanelMenuView.cpp +++ b/panel/PanelMenuView.cpp @@ -700,7 +700,6 @@ void PanelMenuView::DrawTitle(cairo_t *cr_real, nux::Geometry const& geo, std::s using namespace panel; cairo_t* cr; cairo_pattern_t* linpat; - const int fading_pixels = 35; int x = MAIN_LEFT_PADDING + TITLE_PADDING + geo.x; int y = geo.y; @@ -762,6 +761,7 @@ void PanelMenuView::DrawTitle(cairo_t *cr_real, nux::Geometry const& geo, std::s if (text_width > text_space) { int out_pixels = text_width - text_space; + const int fading_pixels = 35; int fading_width = out_pixels < fading_pixels ? out_pixels : fading_pixels; cairo_push_group(cr); |
