feat: working version with bugfixes and readme

This commit is contained in:
Lucas Oskorep
2024-11-08 03:47:00 -05:00
parent 02b98d4a54
commit b8a0075c8c
3 changed files with 12 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
# Pretty Borders
+9 -7
View File
@@ -59,12 +59,14 @@ export default class ActiveBorderExtension extends Extension {
name: 'active-window-border', name: 'active-window-border',
style_class: 'active-window-border', style_class: 'active-window-border',
reactive: false, reactive: false,
x: rect.x - 4, // Adjust for border width x: rect.x - 2, // Adjust for border width
y: rect.y - 4, y: rect.y - 2,
width: rect.width + 8, width: rect.width + 2,
height: rect.height + 8, height: rect.height + 2,
}); });
// this.borderActor = new St.BorderImage({
//
// })
// Add the border actor to the UI group // Add the border actor to the UI group
Main.layoutManager.uiGroup.add_child(this.borderActor); Main.layoutManager.uiGroup.add_child(this.borderActor);
@@ -84,8 +86,8 @@ export default class ActiveBorderExtension extends Extension {
const rect = window.get_frame_rect(); const rect = window.get_frame_rect();
if (!rect) return; if (!rect) return;
this.borderActor.set_position(rect.x - 4, rect.y - 4); this.borderActor.set_position(rect.x - 2, rect.y - 2);
this.borderActor.set_size(rect.width + 8, rect.height + 8); this.borderActor.set_size(rect.width + 2, rect.height + 2);
} }
_clearBorder() { _clearBorder() {
+2 -2
View File
@@ -3,12 +3,12 @@
border: 2px solid rgba(191, 0, 255, 0.8); border: 2px solid rgba(191, 0, 255, 0.8);
border-radius: 3px; border-radius: 3px;
/*border-image-source: linear-gradient(to left, #743ad5, #d53a9d);*/ border-image-source: linear-gradient(to left, #743ad5, #d53a9d);
/*border: 4px solid transparent;*/ /*border: 4px solid transparent;*/
/*border-radius: 5px;*/ /*border-radius: 5px;*/
/*/* Gradient border using border-image */ /*/* Gradient border using border-image */
/*border-image: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet) 1;*/ border-image: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet) 1;
} }