fix: preference window style errors (#2794)

This commit is contained in:
Ran Luo 2021-12-25 20:53:49 +08:00 committed by GitHub
parent ebabd949c2
commit 14d9c83b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 21 deletions

View File

@ -59,7 +59,7 @@ export default {
} }
</script> </script>
<style scoped> <style>
.pref-container { .pref-container {
--prefSideBarWidth: 320px; --prefSideBarWidth: 320px;
@ -72,6 +72,16 @@ export default {
left: 0; left: 0;
display: flex; display: flex;
background: var(--editorBgColor); background: var(--editorBgColor);
& h4 {
margin: 0;
font-weight: normal;
}
& h5 {
font-weight: normal;
}
& .pref-content { & .pref-content {
position: relative; position: relative;
flex: 1; flex: 1;

View File

@ -14,15 +14,14 @@
> >
<i class="el-icon-info"></i> <i class="el-icon-info"></i>
</el-tooltip> </el-tooltip>
<span v-if="notes" class="notes">
{{notes}}
</span>
</div> </div>
<el-switch <el-switch
v-model="status" v-model="status"
@change="handleSwitchChange"> @change="handleSwitchChange">
</el-switch> </el-switch>
<div v-if="notes" class="notes">
{{notes}}
</div>
</div>
</section> </section>
</template> </template>
@ -73,12 +72,11 @@ export default {
user-select: none; user-select: none;
margin: 20px 0; margin: 20px 0;
color: var(--editorColor); color: var(--editorColor);
& .el-switch { display: flex;
float: right; align-items: center;
clear: right; justify-content: space-between;
}
& .description { & .description {
margin-bottom: 10px;
& i { & i {
cursor: pointer; cursor: pointer;
opacity: .7; opacity: .7;
@ -88,26 +86,30 @@ export default {
color: var(--themeColor); color: var(--themeColor);
} }
} }
& .notes { & .notes {
margin-top: 10px;
font-style: italic; font-style: italic;
font-size: 12px; font-size: 12px;
} }
} }
span.el-switch__core::after { span.el-switch__core::after {
top: 3px; top: 3px;
left: 7px; left: 7px;
width: 10px; width: 10px;
height: 10px; height: 10px;
} }
.el-switch .el-switch__core { .el-switch .el-switch__core {
border: 2px solid var(--iconColor); border: 2px solid var(--iconColor);
background: transparent; background: transparent;
box-sizing: border-box; box-sizing: border-box;
} }
span.el-switch__label { span.el-switch__label {
color: var(--editorColor50); color: var(--editorColor50);
} }
.el-switch:not(.is-checked) .el-switch__core::after { .el-switch:not(.is-checked) .el-switch__core::after {
background: var(--iconColor); background: var(--iconColor);
} }

View File

@ -28,12 +28,13 @@ export default {
user-select: none; user-select: none;
margin: 20px 0; margin: 20px 0;
color: var(--editorColor); color: var(--editorColor);
& .pref-compound-body { & .pref-compound-body {
border: 1pt solid lightgray;
padding: 8px 16px 8px 16px; padding: 8px 16px 8px 16px;
margin-top: -12px; margin-top: -12px;
background: rgba(0, 0, 0, .04); background: rgba(0, 0, 0, .04);
} }
& .description { & .description {
margin-bottom: 10px; margin-bottom: 10px;
& i { & i {
@ -45,6 +46,7 @@ export default {
color: var(--themeColor); color: var(--themeColor);
} }
} }
& .notes { & .notes {
margin-top: 10px; margin-top: 10px;
font-style: italic; font-style: italic;

View File

@ -27,15 +27,6 @@ export default {
} }
</script> </script>
<style>
h4 {
margin: 0;
font-weight: normal;
}
h5 {
font-weight: normal;
}
</style>
<style scoped> <style scoped>
.title-bar { .title-bar {
-webkit-app-region: drag; -webkit-app-region: drag;
@ -62,6 +53,7 @@ export default {
height: var(--titleBarHeight); height: var(--titleBarHeight);
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
} }
.frameless-titlebar-button > div { .frameless-titlebar-button > div {
position: absolute; position: absolute;
display: inline-flex; display: inline-flex;
@ -69,12 +61,15 @@ export default {
left: 50%; left: 50%;
transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
} }
.frameless-titlebar-close:hover { .frameless-titlebar-close:hover {
background-color: rgb(228, 79, 79); background-color: rgb(228, 79, 79);
} }
.frameless-titlebar-button svg { .frameless-titlebar-button svg {
fill: #000000 fill: #000000
} }
.frameless-titlebar-close:hover svg { .frameless-titlebar-close:hover svg {
fill: #ffffff fill: #ffffff
} }