From e9f95ca605c225b97963b7a0d5df3dfc6b4702da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 20 Jun 2014 16:23:32 +0200 Subject: [PATCH] calendar: Use Clutter.GridLayout Clutter.TableLayout has been deprecated, so move to the recommended replacement. --- js/ui/calendar.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 35e35e930..4649c0372 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -409,7 +409,7 @@ const Calendar = new Lang.Class({ this._shouldDateGrabFocus = false; this.actor = new St.Widget({ style_class: 'calendar', - layout_manager: new Clutter.TableLayout(), + layout_manager: new Clutter.GridLayout(), reactive: true }); this.actor.connect('scroll-event', @@ -447,8 +447,7 @@ const Calendar = new Lang.Class({ // Top line of the calendar '<| September 2009 |>' this._topBox = new St.BoxLayout(); - layout.pack(this._topBox, 0, 0); - layout.set_span(this._topBox, offsetCols + 7, 1); + layout.attach(this._topBox, 0, 0, offsetCols + 7, 1); this._backButton = new St.Button({ style_class: 'calendar-change-month-back', accessible_name: _("Previous month"), @@ -485,7 +484,7 @@ const Calendar = new Lang.Class({ col = 6 - (7 + iter.getDay() - this._weekStart) % 7; else col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7; - layout.pack(label, col, 1); + layout.attach(label, col, 1, 1, 1); iter.setTime(iter.getTime() + MSECS_IN_DAY); } @@ -657,14 +656,14 @@ const Calendar = new Lang.Class({ col = 6 - (7 + iter.getDay() - this._weekStart) % 7; else col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7; - layout.pack(button, col, row); + layout.attach(button, col, row, 1, 1); this._buttons.push(button); if (this._useWeekdate && iter.getDay() == 4) { let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(), style_class: 'calendar-day-base calendar-week-number'}); - layout.pack(label, rtl ? 7 : 0, row); + layout.attach(label, rtl ? 7 : 0, row, 1, 1); } iter.setTime(iter.getTime() + MSECS_IN_DAY);