fix(ags corners): fix standalone corners not showing
This commit is contained in:
parent
d8cdcda982
commit
cfeba78d79
1 changed files with 55 additions and 48 deletions
|
@ -2,11 +2,17 @@ import { Widget } from '../imports.js';
|
|||
const { Gtk } = imports.gi;
|
||||
const Lang = imports.lang;
|
||||
|
||||
export const RoundedCorner = (place, props) => Widget({
|
||||
...props,
|
||||
type: Gtk.DrawingArea,
|
||||
export const RoundedCorner = (place, props) => Widget.Box({
|
||||
halign: place.includes('left') ? 'start' : 'end',
|
||||
valign: place.includes('top') ? 'start' : 'end',
|
||||
style: `padding: 1px; margin:
|
||||
${place.includes('top') ? '-1px' : '0'}
|
||||
${place.includes('right') ? '-1px' : '0'}
|
||||
${place.includes('bottom') ? '-1px' : '0'}
|
||||
${place.includes('left') ? '-1px' : '0'};`,
|
||||
child: Widget({
|
||||
...props,
|
||||
type: Gtk.DrawingArea,
|
||||
setup: widget => {
|
||||
const r = widget.get_style_context()
|
||||
.get_property('border-radius', Gtk.StateFlags.NORMAL);
|
||||
|
@ -60,6 +66,7 @@ export const RoundedCorner = (place, props) => Widget({
|
|||
cr.stroke();
|
||||
}));
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export const Topleft = () => Widget.Window({
|
||||
|
|
Loading…
Reference in a new issue