Skip to content

Commit

Permalink
💄 style: better tool button
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Apr 22, 2023
1 parent a65a70f commit 096acaf
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 106 deletions.
45 changes: 1 addition & 44 deletions javascript/index.js

Large diffs are not rendered by default.

43 changes: 0 additions & 43 deletions src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,6 @@ const SidebarView = styled.div`
overflow-x: hidden;
overflow-y: auto;
height: -webkit-fill-available;
#quicksettings {
width: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: stretch;
> div > div > div > label {
max-width: 80%;
}
input[type='color'] {
width: 100%;
}
input[type='number'],
textarea {
height: 20px !important;
padding: 4px;
}
> * {
flex: 1;
max-width: unset !important;
min-width: unset !important;
width: 100%;
margin: 0;
padding: 0;
}
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
.dropdown-arrow {
min-width: 16px;
min-height: 16px;
}
}
`

interface SidebarProps {
Expand Down
29 changes: 24 additions & 5 deletions src/theme/components/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
min-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
&.tool {
padding: 0 !important;
max-width: 36px !important;
width: 36px !important;
min-width: 36px !important;
height: 36px !important;
min-height: 36px !important;
max-height: 36px !important;
font-size: 14px !important;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
align-self: end;
line-height: 1;
border: var(--button-border-width) solid var(--button-secondary-border-color);
background: var(--button-secondary-background-fill);
color: var(--button-secondary-text-color);
}

&.secondary-down,
&.secondary-down:hover {
box-shadow: var(--box-shadow-secondary) !important;
}
}

#txt2img_interrupt,
Expand Down Expand Up @@ -35,11 +59,6 @@
}
}

.gradio-button.secondary-down,
.gradio-button.secondary-down:hover {
box-shadow: var(--box-shadow-secondary) !important;
}

#interrogate,
#deepbooru {
display: block !important;
Expand Down
46 changes: 46 additions & 0 deletions src/theme/components/quicksetting.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#quicksettings {
width: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: stretch;

> * {
flex: 1;
max-width: unset !important;
min-width: unset !important;
width: -webkit-fill-available !important;
margin: 0;
padding: 0;
}

.head > label {
min-width: 60%;
max-width: 60%;
margin-right: 12px;
}

input[type='color'] {
width: 100%;
}

input[type='number'],
textarea {
height: 28px !important;
padding: 4px !important;
width: -webkit-fill-available;
box-sizing: border-box;
}

span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}

.dropdown-arrow {
min-width: 16px;
min-height: 16px;
}
}
12 changes: 1 addition & 11 deletions src/theme/extensions/aspect-ratio.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,8 @@
display: flex !important;
}
button {
align-items: center !important;
justify-content: center !important;
border: var(--button-border-width) solid var(--button-secondary-border-color) !important;
border-radius: var(--input-radius) !important;
background: var(--button-secondary-background-fill) !important;
position: relative !important;
font-weight: var(--input-text-weight) !important;
font-size: 12px !important;
line-height: var(--line-sm) !important;
padding: 4px 8px !important;
cursor: pointer;
flex: 1 1 0% !important;
min-height: 32px !important;
margin: 0 !important;
}
}
2 changes: 1 addition & 1 deletion src/theme/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@import 'components/table';
@import 'components/prompt-textarea';
@import 'components/gallery';

@import 'components/quicksetting';
@import 'components/extra-network';
@import 'components/footer';

Expand Down
1 change: 0 additions & 1 deletion src/theme/tabs/tab-to-img.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
[id$='_settings'] {
div.svelte-15lo0d8 > *,
div.svelte-15lo0d8 > .form > * {
min-width: unset !important;
flex: 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion style.css

Large diffs are not rendered by default.

0 comments on commit 096acaf

Please sign in to comment.