@@ -72,6 +72,38 @@ const RedshiftWidget = new Lang.Class({
7272 this . w . attach ( label , 0 , 3 , 1 , 1 ) ;
7373 this . w . attach ( temp , 1 , 3 , 1 , 1 ) ;
7474
75+
76+ let label = new Gtk . Label ( { label : _ ( "Daytime brightness (full: 1.0)" ) ,
77+ xalign : 0 } ) ;
78+
79+ let temp = new Gtk . SpinButton ( ) ;
80+ temp . set_range ( 0.1 , 1.0 ) ;
81+ temp . set_value ( this . _settings . get_double ( Lib . DAY_BRT_KEY ) ) ;
82+ temp . set_digits ( 1 ) ;
83+ temp . set_increments ( 0.1 , 0.5 ) ;
84+ temp . connect ( 'notify::value' , Lang . bind ( this , function ( button ) {
85+ this . _settings . set_double ( Lib . DAY_BRT_KEY , button . value ) ;
86+ } ) ) ;
87+
88+ this . w . attach ( label , 0 , 4 , 1 , 1 ) ;
89+ this . w . attach ( temp , 1 , 4 , 1 , 1 ) ;
90+
91+ let label = new Gtk . Label ( { label : _ ( "Nighttime brightness (e.g.: 0.5)" ) ,
92+ xalign : 0 } ) ;
93+
94+ let temp = new Gtk . SpinButton ( ) ;
95+ temp . set_range ( 0.1 , 1.0 ) ;
96+ temp . set_value ( this . _settings . get_double ( Lib . NIGHT_BRT_KEY ) ) ;
97+ temp . set_digits ( 1 ) ;
98+ temp . set_increments ( 0.1 , 0.5 ) ;
99+ temp . connect ( 'notify::value' , Lang . bind ( this , function ( button ) {
100+ this . _settings . set_double ( Lib . NIGHT_BRT_KEY , button . value ) ;
101+ } ) ) ;
102+
103+
104+ this . w . attach ( label , 0 , 5 , 1 , 1 ) ;
105+ this . w . attach ( temp , 1 , 5 , 1 , 1 ) ;
106+
75107 let label = new Gtk . Label ( { label : _ ( "Length of the dusk/dawn progression in minutes" ) ,
76108 xalign : 0 } ) ;
77109
@@ -84,8 +116,8 @@ const RedshiftWidget = new Lang.Class({
84116 this . _settings . set_uint ( Lib . DUSK_DAWN_LENGTH_KEY , Math . round ( button . value ) ) ;
85117 } ) ) ;
86118
87- this . w . attach ( label , 0 , 4 , 1 , 1 ) ;
88- this . w . attach ( length , 1 , 4 , 1 , 1 ) ;
119+ this . w . attach ( label , 0 , 6 , 1 , 1 ) ;
120+ this . w . attach ( length , 1 , 6 , 1 , 1 ) ;
89121
90122
91123 let label = new Gtk . Label ( { label : _ ( "Source of sunset/sunrise time:" ) ,
@@ -102,8 +134,8 @@ const RedshiftWidget = new Lang.Class({
102134 this . _settings . set_enum ( Lib . TIME_SOURCE_KEY , id ) ;
103135 } ) ) ;
104136
105- this . w . attach ( label , 0 , 5 , 1 , 1 ) ;
106- this . w . attach ( timesrc , 1 , 5 , 1 , 1 ) ;
137+ this . w . attach ( label , 0 , 7 , 1 , 1 ) ;
138+ this . w . attach ( timesrc , 1 , 7 , 1 , 1 ) ;
107139
108140
109141 function format_time ( time ) {
@@ -142,8 +174,8 @@ const RedshiftWidget = new Lang.Class({
142174 }
143175 } ) ) ;
144176
145- this . w . attach ( label , 0 , 6 , 1 , 1 ) ;
146- this . w . attach ( time , 1 , 6 , 1 , 1 ) ;
177+ this . w . attach ( label , 0 , 8 , 1 , 1 ) ;
178+ this . w . attach ( time , 1 , 8 , 1 , 1 ) ;
147179
148180
149181 let label = new Gtk . Label ( { label : _ ( "Time of sunset in fixed mode (hh:mm):" ) ,
@@ -161,8 +193,8 @@ const RedshiftWidget = new Lang.Class({
161193 }
162194 } ) ) ;
163195
164- this . w . attach ( label , 0 , 7 , 1 , 1 ) ;
165- this . w . attach ( time , 1 , 7 , 1 , 1 ) ;
196+ this . w . attach ( label , 0 , 9 , 1 , 1 ) ;
197+ this . w . attach ( time , 1 , 9 , 1 , 1 ) ;
166198
167199 } ,
168200
0 commit comments