Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0c542796
Commit
0c542796
authored
Dec 15, 2023
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make modal toolbar and icon opacity adjustable
parent
cc41cc43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
modules/shared_gradio_themes.py
modules/shared_gradio_themes.py
+4
-0
modules/shared_options.py
modules/shared_options.py
+2
-0
style.css
style.css
+2
-2
No files found.
modules/shared_gradio_themes.py
View file @
0c542796
...
@@ -65,3 +65,7 @@ def reload_gradio_theme(theme_name=None):
...
@@ -65,3 +65,7 @@ def reload_gradio_theme(theme_name=None):
except
Exception
as
e
:
except
Exception
as
e
:
errors
.
display
(
e
,
"changing gradio theme"
)
errors
.
display
(
e
,
"changing gradio theme"
)
shared
.
gradio_theme
=
gr
.
themes
.
Default
(
**
default_theme_args
)
shared
.
gradio_theme
=
gr
.
themes
.
Default
(
**
default_theme_args
)
# append additional values gradio_theme
shared
.
gradio_theme
.
sd_webui_modal_lightbox_toolbar_opacity
=
shared
.
opts
.
sd_webui_modal_lightbox_toolbar_opacity
shared
.
gradio_theme
.
sd_webui_modal_lightbox_icon_opacity
=
shared
.
opts
.
sd_webui_modal_lightbox_icon_opacity
modules/shared_options.py
View file @
0c542796
...
@@ -266,6 +266,8 @@ options_templates.update(options_section(('ui_gallery', "Gallery", "ui"), {
...
@@ -266,6 +266,8 @@ options_templates.update(options_section(('ui_gallery', "Gallery", "ui"), {
"js_modal_lightbox_initially_zoomed"
:
OptionInfo
(
True
,
"Full page image viewer: show images zoomed in by default"
),
"js_modal_lightbox_initially_zoomed"
:
OptionInfo
(
True
,
"Full page image viewer: show images zoomed in by default"
),
"js_modal_lightbox_gamepad"
:
OptionInfo
(
False
,
"Full page image viewer: navigate with gamepad"
),
"js_modal_lightbox_gamepad"
:
OptionInfo
(
False
,
"Full page image viewer: navigate with gamepad"
),
"js_modal_lightbox_gamepad_repeat"
:
OptionInfo
(
250
,
"Full page image viewer: gamepad repeat period"
)
.
info
(
"in milliseconds"
),
"js_modal_lightbox_gamepad_repeat"
:
OptionInfo
(
250
,
"Full page image viewer: gamepad repeat period"
)
.
info
(
"in milliseconds"
),
"sd_webui_modal_lightbox_icon_opacity"
:
OptionInfo
(
1
,
"Full page image viewer: control icon unfocused opacity"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1
,
"step"
:
0.01
},
onchange
=
shared
.
reload_gradio_theme
)
.
info
(
'for mouse only'
)
.
needs_reload_ui
(),
"sd_webui_modal_lightbox_toolbar_opacity"
:
OptionInfo
(
0.9
,
"Full page image viewer: tool bar opacity"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1
,
"step"
:
0.01
},
onchange
=
shared
.
reload_gradio_theme
)
.
info
(
'for mouse only'
)
.
needs_reload_ui
(),
"gallery_height"
:
OptionInfo
(
""
,
"Gallery height"
,
gr
.
Textbox
)
.
info
(
"can be any valid CSS value, for example 768px or 20em"
)
.
needs_reload_ui
(),
"gallery_height"
:
OptionInfo
(
""
,
"Gallery height"
,
gr
.
Textbox
)
.
info
(
"can be any valid CSS value, for example 768px or 20em"
)
.
needs_reload_ui
(),
}))
}))
...
...
style.css
View file @
0c542796
...
@@ -679,7 +679,7 @@ table.popup-table .link{
...
@@ -679,7 +679,7 @@ table.popup-table .link{
transition
:
0.2s
ease
background-color
;
transition
:
0.2s
ease
background-color
;
}
}
.modalControls
:hover
{
.modalControls
:hover
{
background-color
:
rgba
(
0
,
0
,
0
,
0.9
);
background-color
:
rgba
(
0
,
0
,
0
,
var
(
--sd-webui-modal-lightbox-toolbar-opacity
)
);
}
}
.modalClose
{
.modalClose
{
margin-left
:
auto
;
margin-left
:
auto
;
...
@@ -761,7 +761,7 @@ table.popup-table .link{
...
@@ -761,7 +761,7 @@ table.popup-table .link{
.modalPrev
,
.modalPrev
,
.modalNext
,
.modalNext
,
.modalControls
.cursor
{
.modalControls
.cursor
{
opacity
:
0
;
opacity
:
var
(
--sd-webui-modal-lightbox-icon-opacity
)
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment