Skip to content

Commit e6aa49d

Browse files
pikinier20tanishiking
authored andcommitted
Smaller icons. Minor UI/UX fixes
1 parent 77980fe commit e6aa49d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

scaladoc-js/resources/scaladoc-searchbar.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126

127127
/* Snippets */
128128

129+
.snippet {
130+
cursor: default;
131+
}
132+
129133
.snippet .snippet-meta {
130134
border-top: 2px solid var(--inactive-bg);
131135
color: var(--inactive-fg);
@@ -139,15 +143,15 @@
139143
}
140144

141145
.snippet .buttons {
142-
--icon-size: 24px;
146+
--icon-size: 16px;
143147
}
144148

145149
.snippet-showhide {
146150
display: flex;
147151
flex-direction: row;
148152
align-items: center;
149-
--slider-width: 48px;
150-
--slider-height: 20px;
153+
--slider-width: 40px;
154+
--slider-height: 16px;
151155
--slider-diameter: calc(var(--slider-height) - 4px);
152156
}
153157

@@ -233,6 +237,7 @@ input:checked + .slider:before {
233237
border: none;
234238
font-size: var(--icon-size);
235239
color: var(--inactive-fg);
240+
cursor: pointer;
236241
}
237242

238243
.snippet .buttons button:hover:not(:disabled) {

scaladoc-js/src/code-snippets/CodeSnippets.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class CodeSnippets:
1212

1313
def enrichSnippets() = document.querySelectorAll("div.snippet").foreach {
1414
case snippet: html.Element =>
15+
snippet.addEventListener("click", e => e.stopPropagation())
1516
snippetAnchor(snippet)
1617
handleHideableCode(snippet)
1718
handleImportedCode(snippet)
@@ -120,7 +121,8 @@ class CodeSnippets:
120121
val buttonsSection = getButtonsSection(snippet)
121122
buttonsSection.foreach(s =>
122123
s.appendChild(copyButton)
123-
s.appendChild(runButton)
124+
// Temporarily disabled
125+
// s.appendChild(runButton)
124126
)
125127
}
126128

0 commit comments

Comments
 (0)