From 933cb6d67a0015491bff95fe6e4c2da25493cd27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Wed, 8 May 2024 17:36:59 +0200 Subject: [PATCH] Make the new doxygen clipboard feature work and look good --- doc/doxygen.css | 41 +++++++++++++++++++++++++++++++++++++++++ doc/header.html.in | 1 + 2 files changed, 42 insertions(+) diff --git a/doc/doxygen.css b/doc/doxygen.css index 632fbba..81655d3 100644 --- a/doc/doxygen.css +++ b/doc/doxygen.css @@ -147,12 +147,53 @@ div.fragment { font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 10pt; + position: relative; padding: 0.5em 1em; background-color: #f5f5f5; border: 1px solid #bbb; border-radius(5px); } +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: auto; + fill: black; + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid black; + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: #2EC82E; +} + +.clipboard.success { + border-color: #2EC82E; +} + div.line { min-height: 13px; text-wrap: unrestricted; diff --git a/doc/header.html.in b/doc/header.html.in index c5c609e..bfc4d76 100644 --- a/doc/header.html.in +++ b/doc/header.html.in @@ -7,6 +7,7 @@ +