Просмотр исходного кода

拆分意思过长显示滚动条

visuddhinanda 4 лет назад
Родитель
Сommit
9fec2fb0ea
2 измененных файлов с 34 добавлено и 3 удалено
  1. 32 1
      app/studio/editor.php
  2. 2 2
      app/studio/js/editor.js

+ 32 - 1
app/studio/editor.php

@@ -303,7 +303,38 @@ else{$currDevice="computer";}
 	#merge_button:hover>.icon{
 		fill: var(--link-hover-color);
 	}
-	</style>
+	#om_dropdown_area::-webkit-scrollbar {
+		width: 14px;
+		height: 14px;
+	}
+	#om_dropdown_area::-webkit-scrollbar-thumb {
+		background-color: var(--link-color);
+	}
+	#om_dropdown_area::-webkit-scrollbar-button:single-button {
+		width: 14px
+		height: 14px;
+		display: block;
+		background-color: var(--link-color);
+		background-repeat: no-repeat;
+		background-position-x: center;
+		background-position-y: bottom;
+		background-origin: content-box;
+		background-color: var(--main-color1);
+		border-radius: 10px;
+	}
+	#om_dropdown_area::-webkit-scrollbar-button:single-button:horizontal:decrement {
+		background: url(../../node_modules/bootstrap-icons/icons/chevron-left.svg);
+	}
+	#om_dropdown_area::-webkit-scrollbar-button:single-button:horizontal:decrement:hover {
+		background-color:var(--link-color);
+	}
+	#om_dropdown_area::-webkit-scrollbar-button:single-button:horizontal:increment {
+		background: url(../../node_modules/bootstrap-icons/icons/chevron-right.svg);
+	}
+	#om_dropdown_area::-webkit-scrollbar-button:single-button:horizontal:increment:hover {
+		background-color:var(--link-color);
+	}
+		</style>
 	<link type="text/css" rel="stylesheet" href="css/print.css" media="print" />
 	<style id="display_set">
 	</style>

+ 2 - 2
app/studio/js/editor.js

@@ -3507,7 +3507,7 @@ function refreshPartMeaningSelect() {
 	if (g_initPartMeaning) {
 		g_arrPartMean = part.split("+");
 	}
-	var output = "<div style='overflow-x: scroll;white-space: nowrap;max-width: 13em;'>";
+	var output = "<div id='om_dropdown_area' style='overflow-x: auto;white-space: nowrap;max-width: 13em;'>";
 	//output="<span style='width:90%' onclick=\"input_org_switch('input_org_select','input_om')\"></span><br/>"
 	for (iPart in arrPart) {
 		output += getMeaningMenuList(iPart, arrPart[iPart]);
@@ -3518,7 +3518,7 @@ function refreshPartMeaningSelect() {
 		}
 	}
 	output += "</div>";
-	output += "<div style='width: 6em;'>";
+	output += "<div style='width: 5.5em;'>";
 	output += "<button style='margin-left:auto; padding: 1px 6px;' onclick=\"copy_part_mean_to_mean()\">";
 	output += '<svg class="icon"><use xlink="http://www.w3.org/1999/xlink" href="svg/icon.svg#ic_vertical_align_top">';
 	output += "</button>";