YanTianlong commited on
Commit
55bf01e
·
1 Parent(s): e030bda

修改“介绍卡片”和“INPUT、OUTPUT”的圆角

Browse files
Files changed (1) hide show
  1. app.py +32 -4
app.py CHANGED
@@ -88,6 +88,8 @@ APP_CSS = """
88
  --vg-muted: #667085;
89
  --vg-line: #eceef5;
90
  --vg-soft: #f6f7fb;
 
 
91
  }
92
  :root:root:root:root main {
93
  max-width: 1160px;
@@ -101,9 +103,21 @@ APP_CSS = """
101
  .voicegate-card {
102
  background: #ffffff;
103
  border: 1px solid var(--vg-line);
104
- border-radius: 8px;
105
  padding: 12px;
106
  box-shadow: none;
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
  .voicegate-intro {
109
  margin: 10px 0 12px;
@@ -144,7 +158,7 @@ APP_CSS = """
144
  align-items: center;
145
  justify-content: center;
146
  border: 1px solid rgba(99, 102, 199, 0.34);
147
- border-radius: 6px;
148
  padding: 6px 12px;
149
  color: var(--vg-primary) !important;
150
  background: #ffffff;
@@ -160,7 +174,7 @@ APP_CSS = """
160
  display: inline-flex;
161
  align-items: center;
162
  margin: 0 0 10px;
163
- border-radius: 6px;
164
  padding: 5px 8px;
165
  background: #ececf1;
166
  color: var(--vg-ink);
@@ -206,6 +220,20 @@ APP_CSS = """
206
  font-size: 13px;
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  /* Make accordions look like simple rows instead of another nested card. */
210
  .voicegate-card details,
211
  .voicegate-card details > summary {
@@ -304,7 +332,7 @@ def voicegate_theme() -> gr.Theme:
304
  return gr.themes.Base(
305
  primary_hue=primary,
306
  secondary_hue=gr.themes.colors.neutral,
307
- radius_size=gr.themes.sizes.radius_sm,
308
  font=[gr.themes.GoogleFont("Open Sans"), "ui-sans-serif", "system-ui", "sans-serif"],
309
  ).set(
310
  background_fill_primary="*neutral_100",
 
88
  --vg-muted: #667085;
89
  --vg-line: #eceef5;
90
  --vg-soft: #f6f7fb;
91
+ --vg-radius: 20px;
92
+ --vg-radius-sm: 10px;
93
  }
94
  :root:root:root:root main {
95
  max-width: 1160px;
 
103
  .voicegate-card {
104
  background: #ffffff;
105
  border: 1px solid var(--vg-line);
106
+ border-radius: var(--vg-radius) !important;
107
  padding: 12px;
108
  box-shadow: none;
109
+ overflow: hidden;
110
+ }
111
+
112
+ /* Gradio may attach elem_classes to an outer wrapper while the visible block is a
113
+ child element. Apply the same rounded corner to both so the final rendered card
114
+ never appears square. */
115
+ .voicegate-card.block,
116
+ .voicegate-card > .block,
117
+ .voicegate-card > div,
118
+ .voicegate-card > div > .block {
119
+ border-radius: var(--vg-radius) !important;
120
+ overflow: hidden;
121
  }
122
  .voicegate-intro {
123
  margin: 10px 0 12px;
 
158
  align-items: center;
159
  justify-content: center;
160
  border: 1px solid rgba(99, 102, 199, 0.34);
161
+ border-radius: var(--vg-radius-sm);
162
  padding: 6px 12px;
163
  color: var(--vg-primary) !important;
164
  background: #ffffff;
 
174
  display: inline-flex;
175
  align-items: center;
176
  margin: 0 0 10px;
177
+ border-radius: var(--vg-radius-sm);
178
  padding: 5px 8px;
179
  background: #ececf1;
180
  color: var(--vg-ink);
 
220
  font-size: 13px;
221
  }
222
 
223
+ /* Match FaceFusion-like softly rounded inner controls without adding extra boxes. */
224
+ .voicegate-card input,
225
+ .voicegate-card textarea,
226
+ .voicegate-card select,
227
+ .voicegate-card button,
228
+ .voicegate-card .wrap,
229
+ .voicegate-card .container,
230
+ .voicegate-card .input-container,
231
+ .voicegate-card .dropdown-arrow,
232
+ .voicegate-card details,
233
+ .voicegate-card details > summary {
234
+ border-radius: var(--vg-radius-sm) !important;
235
+ }
236
+
237
  /* Make accordions look like simple rows instead of another nested card. */
238
  .voicegate-card details,
239
  .voicegate-card details > summary {
 
332
  return gr.themes.Base(
333
  primary_hue=primary,
334
  secondary_hue=gr.themes.colors.neutral,
335
+ radius_size=gr.themes.sizes.radius_md,
336
  font=[gr.themes.GoogleFont("Open Sans"), "ui-sans-serif", "system-ui", "sans-serif"],
337
  ).set(
338
  background_fill_primary="*neutral_100",