feat(ags): remove eventbox from systray because of bug

This commit is contained in:
matt1432 2023-09-08 21:27:25 -04:00
parent 7b8d0d4b54
commit 1488f4992f
3 changed files with 51 additions and 36 deletions

View file

@ -1,8 +1,8 @@
const { SystemTray } = ags.Service; const { SystemTray } = ags.Service;
const { Box, Button, Icon, MenuItem } = ags.Widget; const { Box, Button, Icon, MenuItem } = ags.Widget;
const { Gtk } = imports.gi; const { Gtk } = imports.gi;
import { EventBox } from '../common.js';
// this one uses a MenuBar and shouldn't throw that destroyed widget warning
const SysTrayItem = item => MenuItem({ const SysTrayItem = item => MenuItem({
className: 'tray-item', className: 'tray-item',
child: Icon({ child: Icon({
@ -15,7 +15,7 @@ const SysTrayItem = item => MenuItem({
}]] }]]
}); });
export const SysTrayModule = () => ags.Widget({ const SysTrayModule = () => ags.Widget({
type: Gtk.MenuBar, type: Gtk.MenuBar,
className: 'sys-tray', className: 'sys-tray',
properties: [ properties: [

View file

@ -11,6 +11,15 @@
all: unset; all: unset;
padding: 0px 2px 0px 2px; padding: 0px 2px 0px 2px;
font-size: 25px; font-size: 25px;
border-radius: 100%;
transition: background-color 0.5s ease-in-out,
border 0.5s ease-in-out;
&:hover {
background: rgba(127, 132, 156, 0.4);
border-radius: 100%;
transition: background-color 0.5s ease-in-out,
border 0.5s ease-in-out;
}
} }
menu { menu {

View file

@ -138,7 +138,13 @@
.sys-tray .tray-item { .sys-tray .tray-item {
all: unset; all: unset;
padding: 0px 2px 0px 2px; padding: 0px 2px 0px 2px;
font-size: 25px; } font-size: 25px;
border-radius: 100%;
transition: background-color 0.5s ease-in-out, border 0.5s ease-in-out; }
.sys-tray .tray-item:hover {
background: rgba(127, 132, 156, 0.4);
border-radius: 100%;
transition: background-color 0.5s ease-in-out, border 0.5s ease-in-out; }
.sys-tray menu { .sys-tray menu {
background: #282a36; background: #282a36;
padding-top: 5px; padding-top: 5px;