|
4 | 4 | */ |
5 | 5 |
|
6 | 6 | 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; |
10 | 9 |
|
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"); |
12 | 13 |
|
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"); |
15 | 15 |
|
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"); |
19 | 18 |
|
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"); |
22 | 22 |
|
23 | 23 | unowned var dbusclient = DBusClient.get_default (); |
24 | 24 |
|
|
0 commit comments