Fixed the page/layout being pushed up when expanders or other item expanded and then collapsed. (#1559)

This commit is contained in:
Alejandro Gil 2022-10-20 15:49:30 -07:00 committed by GitHub
commit 52bb75058b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -30,6 +30,7 @@ button[data-baseweb="tab"] {
justify-content: center;
}
/* Streamlit header */
.css-1avcm0n {
background-color: transparent;
@ -135,6 +136,7 @@ div.gallery:hover {
/********************************************************************
Hide anchor links on titles
*********************************************************************/
/*
.css-15zrgzn {
display: none
}
@ -159,6 +161,7 @@ div.gallery:hover {
.css-18e3th9{
padding-left: 10px;
padding-right: 10px;
position: unset !important; /* Fixes the layout/page going up when an expander or another item is expanded and then collapsed */
}
.css-k1vhr4{
padding-top: initial;
@ -168,4 +171,8 @@ div.gallery:hover {
padding-right: 25px;
gap: initial;
display: initial;
}
}
.css-w5z5an{
gap: 1px;
}

View File

@ -61,7 +61,7 @@ def layout():
custom_models_available()
if server_state["CustomModel_available"]:
st.session_state.default_model = st.selectbox("Default Model:", server_state["custom_models"],
st.session_state.defaults.general.default_model = st.selectbox("Default Model:", server_state["custom_models"],
index=server_state["custom_models"].index(st.session_state['defaults'].general.default_model),
help="Select the model you want to use. If you have placed custom models \
on your 'models/custom' folder they will be shown here as well. The model name that will be shown here \
@ -69,7 +69,7 @@ def layout():
it is recommended to give the .ckpt file a name that \
will make it easier for you to distinguish it from other models. Default: Stable Diffusion v1.4")
else:
st.session_state.default_model = st.selectbox("Default Model:", [st.session_state['defaults'].general.default_model],
st.session_state.defaults.general.default_model = st.selectbox("Default Model:", [st.session_state['defaults'].general.default_model],
help="Select the model you want to use. If you have placed custom models \
on your 'models/custom' folder they will be shown here as well. \
The model name that will be shown here is the same as the name\