diff --git a/src/extension.js b/src/extension.js index 7344921..ea85521 100644 --- a/src/extension.js +++ b/src/extension.js @@ -668,6 +668,7 @@ const WeatherMenuButton = new Lang.Class({ this.parseWeatherCurrent(); })); this._buttonBox1.add_actor(button); + this._buttonBox1MinWidth = this._buttonBox1.get_width(); this._buttonBox2 = new St.BoxLayout({style_class: 'popup-menu-item'}); @@ -836,7 +837,7 @@ const WeatherMenuButton = new Lang.Class({ _onOpenStateChanged: function(menu, open) { if (open) { - this._buttonBox1.set_width(this._currentWeather.get_width() - this._buttonBox2.get_width()); + this._buttonBox1.set_width(Math.max(this._buttonBox1MinWidth,this._currentWeather.get_width() - this._buttonBox2.get_width())); if (this._forecastScrollBox !== undefined && this._forecastBox !== undefined && this._currentWeather !== undefined) { this._forecastScrollBox.set_width(this._currentWeather.get_width()); this._forecastScrollBox.show();