From 479ff657c3cf5aeaa8a21d710dc480c402cb6422 Mon Sep 17 00:00:00 2001 From: Vincent Langlois Date: Sun, 21 Jan 2024 12:15:48 -0500 Subject: [PATCH 1/3] Added maximize disabled styling --- icon/maximize-disabled.svg | 4 ++++ style.css | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 icon/maximize-disabled.svg diff --git a/icon/maximize-disabled.svg b/icon/maximize-disabled.svg new file mode 100644 index 0000000..8a65ef5 --- /dev/null +++ b/icon/maximize-disabled.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/style.css b/style.css index 9d50c03..93719fa 100644 --- a/style.css +++ b/style.css @@ -266,6 +266,12 @@ input[type="reset"]:disabled, background-position: top 2px left 3px; } +.title-bar-controls button[aria-label="Maximize"]:disabled { + background-image: svg-load("./icon/maximize-disabled.svg"); + background-repeat: no-repeat; + background-position: top 2px left 3px; +} + .title-bar-controls button[aria-label="Restore"] { background-image: svg-load("./icon/restore.svg"); background-repeat: no-repeat; From ab53e57a7285f4ab57b107f208719dfc4d9fdfaf Mon Sep 17 00:00:00 2001 From: Vincent Langlois Date: Sun, 21 Jan 2024 12:27:15 -0500 Subject: [PATCH 2/3] Added documentation --- docs/index.html.ejs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/index.html.ejs b/docs/index.html.ejs index 253ba57..819f6e8 100644 --- a/docs/index.html.ejs +++ b/docs/index.html.ejs @@ -612,6 +612,20 @@ + `) %> +

+ Maximize buttons can be disabled, useful when making a window appear as if it cannot be maximized. +

+ + <%- example(` +
+
A Title Bar with Maximize disabled
+
+ + + +
+
`) %>

You can make a title bar "inactive" by adding inactive class, From ec61a0d596f55075e46f7a1f92c64c646f65b704 Mon Sep 17 00:00:00 2001 From: Vincent Langlois Date: Sat, 27 Jan 2024 21:08:21 -0500 Subject: [PATCH 3/3] Added class button styling --- style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/style.css b/style.css index 1ed8111..d821c85 100644 --- a/style.css +++ b/style.css @@ -267,7 +267,8 @@ input[type="reset"]:disabled, background-position: top 2px left 3px; } -.title-bar-controls button[aria-label="Maximize"]:disabled { +.title-bar-controls button[aria-label="Maximize"]:disabled, +.title-bar-controls button[aria-label].maximize:disabled { background-image: svg-load("./icon/maximize-disabled.svg"); background-repeat: no-repeat; background-position: top 2px left 3px;