Revert "calendar: Use Clutter.GridLayout"
GridLayout has some weird allocation issues, TableLayout - deprecated
or not - works, so just keep using that for now.
This reverts commit e9f95ca605
.
https://bugzilla.gnome.org/show_bug.cgi?id=744817
This commit is contained in:
parent
df81c98b65
commit
39cfe488a4
@ -416,7 +416,7 @@ const Calendar = new Lang.Class({
|
|||||||
this._shouldDateGrabFocus = false;
|
this._shouldDateGrabFocus = false;
|
||||||
|
|
||||||
this.actor = new St.Widget({ style_class: 'calendar',
|
this.actor = new St.Widget({ style_class: 'calendar',
|
||||||
layout_manager: new Clutter.GridLayout(),
|
layout_manager: new Clutter.TableLayout(),
|
||||||
reactive: true });
|
reactive: true });
|
||||||
|
|
||||||
this.actor.connect('scroll-event',
|
this.actor.connect('scroll-event',
|
||||||
@ -454,7 +454,8 @@ const Calendar = new Lang.Class({
|
|||||||
|
|
||||||
// Top line of the calendar '<| September 2009 |>'
|
// Top line of the calendar '<| September 2009 |>'
|
||||||
this._topBox = new St.BoxLayout();
|
this._topBox = new St.BoxLayout();
|
||||||
layout.attach(this._topBox, 0, 0, offsetCols + 7, 1);
|
layout.pack(this._topBox, 0, 0);
|
||||||
|
layout.set_span(this._topBox, offsetCols + 7, 1);
|
||||||
|
|
||||||
this._backButton = new St.Button({ style_class: 'calendar-change-month-back pager-button',
|
this._backButton = new St.Button({ style_class: 'calendar-change-month-back pager-button',
|
||||||
accessible_name: _("Previous month"),
|
accessible_name: _("Previous month"),
|
||||||
@ -491,7 +492,7 @@ const Calendar = new Lang.Class({
|
|||||||
col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
|
col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
|
||||||
else
|
else
|
||||||
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
|
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
|
||||||
layout.attach(label, col, 1, 1, 1);
|
layout.pack(label, col, 1);
|
||||||
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,14 +665,14 @@ const Calendar = new Lang.Class({
|
|||||||
col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
|
col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
|
||||||
else
|
else
|
||||||
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
|
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
|
||||||
layout.attach(button, col, row, 1, 1);
|
layout.pack(button, col, row);
|
||||||
|
|
||||||
this._buttons.push(button);
|
this._buttons.push(button);
|
||||||
|
|
||||||
if (this._useWeekdate && iter.getDay() == 4) {
|
if (this._useWeekdate && iter.getDay() == 4) {
|
||||||
let label = new St.Label({ text: iter.toLocaleFormat('%V'),
|
let label = new St.Label({ text: iter.toLocaleFormat('%V'),
|
||||||
style_class: 'calendar-day-base calendar-week-number'});
|
style_class: 'calendar-day-base calendar-week-number'});
|
||||||
layout.attach(label, rtl ? 7 : 0, row, 1, 1);
|
layout.pack(label, rtl ? 7 : 0, row);
|
||||||
}
|
}
|
||||||
|
|
||||||
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
||||||
|
Loading…
Reference in New Issue
Block a user