Skip to content

Commit 933cb6d

Browse files
committed
Make the new doxygen clipboard feature work and look good
1 parent d318090 commit 933cb6d

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

doc/doxygen.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,53 @@ div.fragment {
147147

148148
font-family: Consolas, "Liberation Mono", Courier, monospace;
149149
font-size: 10pt;
150+
position: relative;
150151
padding: 0.5em 1em;
151152
background-color: #f5f5f5;
152153
border: 1px solid #bbb;
153154
border-radius(5px);
154155
}
155156

157+
.clipboard {
158+
width: 24px;
159+
height: 24px;
160+
right: 5px;
161+
top: 5px;
162+
opacity: 0;
163+
position: absolute;
164+
display: inline;
165+
overflow: auto;
166+
fill: black;
167+
justify-content: center;
168+
align-items: center;
169+
cursor: pointer;
170+
}
171+
172+
.clipboard.success {
173+
border: 1px solid black;
174+
border-radius: 4px;
175+
}
176+
177+
.fragment:hover .clipboard, .clipboard.success {
178+
opacity: .28;
179+
}
180+
181+
.clipboard:hover, .clipboard.success {
182+
opacity: 1 !important;
183+
}
184+
185+
.clipboard:active:not([class~=success]) svg {
186+
transform: scale(.91);
187+
}
188+
189+
.clipboard.success svg {
190+
fill: #2EC82E;
191+
}
192+
193+
.clipboard.success {
194+
border-color: #2EC82E;
195+
}
196+
156197
div.line {
157198
min-height: 13px;
158199
text-wrap: unrestricted;

doc/header.html.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
88
<script type="text/javascript" src="jquery.js"></script>
99
<script type="text/javascript" src="dynsections.js"></script>
10+
<script type="text/javascript" src="clipboard.js"></script>
1011
<script type="text/javascript" src="cookie.js"></script>
1112
<link rel="stylesheet" type="text/css" href="search/search.css" />
1213
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />

0 commit comments

Comments
 (0)