IHM tweaks

This commit is contained in:
Benjamin Drieu 2021-11-19 23:07:45 +01:00
parent 838f4012a1
commit 54dced6925
2 changed files with 13 additions and 6 deletions

View File

@ -58,7 +58,7 @@ const column_definitions = {
status: { label: _('Status'), width: 50, expand: false, },
host_name: { label: _('Host name'), width: 300, expand: false, },
service_display_name: { label: _('Service'), width: 300, expand: false, },
last_check: { label: _('Last check'), width: 200, expand: false, },
last_check: { label: _('Last check'), width: 200, expand: false, type: 'date' },
attempts: { label: _('Attempts'), width: 50, expand: false, },
status_information: { label: _('Information'), width: 600, expand: true, },
actions: { label: 'Actions', width: 100, expand: true, special: 'actions' },
@ -151,7 +151,7 @@ class Indicator extends PanelMenu.Button {
this._prefsButton = this._createButton ( 'preferences-system-symbolic', 'Preferences', this._onPreferencesActivate );
this._buttonMenu.actor.add_child (this._prefsButton);
this._updateButton = this._createButton ( 'mail-send-receive-symbolic', 'Reload', this.updateStatus ); // Implement this
this._updateButton = this._createButton ( 'emblem-synchronizing-symbolic', 'Reload', this.updateStatus ); // Implement this
this._buttonMenu.actor.add_child (this._updateButton );
this._reloadButton = this._createButton ( 'view-refresh-symbolic', 'Reload', this.updateStatus );
@ -261,17 +261,18 @@ class Indicator extends PanelMenu.Button {
let _child;
if ( ! col [ 'special' ] )
_child = new St.Label({ style_class: 'monito-label', text: text });
_child = new St.Label({ style_class: 'monito-label', text: text, });
else if ( col.special == 'actions' )
{
_child = new St.BoxLayout ( { x_expand: true,
x_align: Clutter.ActorAlign.FILL,
vertical: false } );
let _button = new St.Button ( {
style_class: 'button small-button',
x_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.CENTER,
can_focus: true,
track_hover: true,
} );
_button.child = new St.Icon ( {
icon_name: 'view-refresh-symbolic',
@ -393,7 +394,7 @@ class Indicator extends PanelMenu.Button {
can_focus: true,
track_hover: true,
accessible_name: text,
style_class: 'button',
style_class: 'button big-button',
});
button.child = new St.Icon({

View File

@ -92,6 +92,12 @@
margin: 0px;
}
.button {
.big-button {
padding: 12px !important;
}
.small-button {
padding: 3px !important;
}