@ -68,6 +68,7 @@ const WEATHER_SHOW_TEXT_IN_PANEL_KEY = 'show-text-in-panel';
const WEATHER _POSITION _IN _PANEL _KEY = 'position-in-panel' ;
const WEATHER _SHOW _COMMENT _IN _PANEL _KEY = 'show-comment-in-panel' ;
const WEATHER _REFRESH _INTERVAL = 'refresh-interval' ;
const WEATHER _CENTER _FORECAST _KEY = 'center-forecast' ;
const WEATHER _DAYS _FORECAST = 'days-forecast' ;
// Keep enums in sync with GSettings schemas
@ -499,13 +500,27 @@ const WeatherMenuButton = new Lang.Class({
this . _settings . set _int ( WEATHER _REFRESH _INTERVAL , v ) ;
} ,
get _center _forecast ( ) {
if ( ! this . _settings )
this . loadConfig ( ) ;
return this . _settings . get _boolean ( WEATHER _CENTER _FORECAST _KEY ) ;
} ,
set _center _forecast ( v ) {
if ( ! this . _settings )
this . loadConfig ( ) ;
this . _settings . set _boolean ( WEATHER _CENTER _FORECAST _KEY , v ) ;
} ,
get _days _forecast ( ) {
if ( ! this . _settings ) this . loadConfig ( ) ;
if ( ! this . _settings )
this . loadConfig ( ) ;
return this . _settings . get _int ( WEATHER _DAYS _FORECAST ) ;
} ,
set _days _forecast ( v ) {
if ( ! this . _settings ) this . loadConfig ( ) ;
if ( ! this . _settings )
this . loadConfig ( ) ;
this . _settings . set _int ( WEATHER _DAYS _FORECAST , v ) ;
} ,
@ -1610,7 +1625,10 @@ const WeatherMenuButton = new Lang.Class({
this . destroyFutureWeather ( ) ;
this . _forecast = [ ] ;
this . _forecastBox = new St . BoxLayout ( ) ;
this . _forecastBox = new St . BoxLayout ( {
x _align : this . _center _forecast ? St . Align . END : St . Align . START ,
style _class : 'weather-forecast-box'
} ) ;
this . _forecastScrollBox = new St . ScrollView ( {
style _class : 'weather-forecasts'
@ -1650,7 +1668,7 @@ const WeatherMenuButton = new Lang.Class({
by . add _actor ( forecastWeather . Temperature ) ;
let bb = new St . BoxLayout ( {
style _class : 'weather-forecast-box'
style _class : 'weather-forecast-icon box'
} ) ;
bb . add _actor ( forecastWeather . Icon ) ;
bb . add _actor ( by ) ;