Skip to content

Commit aa8f54f

Browse files
ryonakanostsdc
authored andcommitted
Lessen scope
1 parent f60cda6 commit aa8f54f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Indicator/Widgets/DisplayWidget.vala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
*/
55

66
public class Monitor.Widgets.DisplayWidget : Gtk.Grid {
7-
public IndicatorWidgetPercentage cpu_widget = new IndicatorWidgetPercentage ("cpu-symbolic");
8-
public IndicatorWidgetFrequency cpu_frequency_widget = new IndicatorWidgetFrequency ("cpu-symbolic");
9-
public IndicatorWidgetTemperature cpu_temperature_widget = new IndicatorWidgetTemperature ("temperature-sensor-symbolic");
7+
construct {
8+
valign = Gtk.Align.CENTER;
109

11-
public IndicatorWidgetPercentage memory_widget = new IndicatorWidgetPercentage ("ram-symbolic");
10+
var cpu_widget = new IndicatorWidgetPercentage ("cpu-symbolic");
11+
var cpu_frequency_widget = new IndicatorWidgetFrequency ("cpu-symbolic");
12+
var cpu_temperature_widget = new IndicatorWidgetTemperature ("temperature-sensor-symbolic");
1213

13-
public IndicatorWidgetBandwidth network_up_widget = new IndicatorWidgetBandwidth ("go-up-symbolic");
14-
public IndicatorWidgetBandwidth network_down_widget = new IndicatorWidgetBandwidth ("go-down-symbolic");
14+
var memory_widget = new IndicatorWidgetPercentage ("ram-symbolic");
1515

16-
public IndicatorWidgetPercentage gpu_widget = new IndicatorWidgetPercentage ("gpu-symbolic");
17-
public IndicatorWidgetPercentage gpu_memory_widget = new IndicatorWidgetPercentage ("gpu-vram-symbolic");
18-
public IndicatorWidgetTemperature gpu_temperature_widget = new IndicatorWidgetTemperature ("temperature-gpu-symbolic");
16+
var network_up_widget = new IndicatorWidgetBandwidth ("go-up-symbolic");
17+
var network_down_widget = new IndicatorWidgetBandwidth ("go-down-symbolic");
1918

20-
construct {
21-
valign = Gtk.Align.CENTER;
19+
var gpu_widget = new IndicatorWidgetPercentage ("gpu-symbolic");
20+
var gpu_memory_widget = new IndicatorWidgetPercentage ("gpu-vram-symbolic");
21+
var gpu_temperature_widget = new IndicatorWidgetTemperature ("temperature-gpu-symbolic");
2222

2323
unowned var dbusclient = DBusClient.get_default ();
2424

0 commit comments

Comments
 (0)