mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
add new CSS for search box
This commit is contained in:
@@ -151,6 +151,49 @@
|
|||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.litegraph.litesearchbox {
|
||||||
|
font-family:Tahoma, sans-serif;
|
||||||
|
position: absolute;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.litegraph.litesearchbox input, .litegraph.litesearchbox select {
|
||||||
|
margin-top: 3px;
|
||||||
|
min-width: 60px;
|
||||||
|
min-height: 1.5em;
|
||||||
|
background-color: black;
|
||||||
|
border: 0;
|
||||||
|
color: white;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.litegraph.litesearchbox .name {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 60px;
|
||||||
|
min-height: 1.5em;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
litegraph.litesearchbox .helper {
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 200px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.litegraph.lite-search-item {
|
||||||
|
font-family:Tahoma, sans-serif;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
color: white;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.litegraph.lite-search-item:hover, .litegraph.lite-search-item.selected {
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
/* OLD */
|
/* OLD */
|
||||||
|
|
||||||
|
|||||||
@@ -6344,8 +6344,8 @@ LGraphCanvas.prototype.showSearchBox = function(event)
|
|||||||
var input_html = "";
|
var input_html = "";
|
||||||
|
|
||||||
var dialog = document.createElement("div");
|
var dialog = document.createElement("div");
|
||||||
dialog.className = "graphdialog";
|
dialog.className = "litegraph litesearchbox";
|
||||||
dialog.innerHTML = "<span class='name'>Search</span> <input autofocus type='text' class='value'/><div class='helper'></div>";
|
dialog.innerHTML = "<span class='name'>Search</span> <input autofocus onblur='this.focus()' type='text' class='value'/><div class='helper'></div>";
|
||||||
dialog.close = function()
|
dialog.close = function()
|
||||||
{
|
{
|
||||||
that.search_box = null;
|
that.search_box = null;
|
||||||
@@ -6481,7 +6481,7 @@ LGraphCanvas.prototype.showSearchBox = function(event)
|
|||||||
var help = document.createElement("div");
|
var help = document.createElement("div");
|
||||||
if(!first) first = i;
|
if(!first) first = i;
|
||||||
help.innerText = i;
|
help.innerText = i;
|
||||||
help.className = "help-item";
|
help.className = "litegraph lite-search-item";
|
||||||
help.addEventListener("click", function(e){
|
help.addEventListener("click", function(e){
|
||||||
select( this.innerText );
|
select( this.innerText );
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user