테마선택- tab으로 변경

This commit is contained in:
khk 2019-11-26 10:56:58 +09:00
parent 664a92781f
commit 7da4bfb5ee
5 changed files with 105 additions and 43 deletions

View File

@ -4,7 +4,7 @@
</mat-card-header>
<mat-card-content>
<div fxFlex class="setting-tab">
<mat-tab-group animationDuration="0ms" vertical>
<mat-tab-group animationDuration="0ms">
<mat-tab>
<ng-template mat-tab-label>
<span class="mdi mdi-settings"></span>

View File

@ -25,6 +25,24 @@
position: relative;
width: 100%;
height: 100%;
.mat-tab-group {
flex-direction: row;
.mat-tab-header {
width: 160px;
.mat-tab-labels {
flex-direction: column;
.mat-tab-label {
padding: 0 10px;
align-content: flex-start;
text-align: left;
align-items: self-start;
justify-content: flex-start;
}
.mat-ink-bar {
display: none;
}
}
}
.mat-tab-body-wrapper {
border-left: 1px solid #dddddd;
position: relative;
@ -33,6 +51,7 @@
}
}
}
}
.button-farm {
text-align: right;
@ -51,6 +70,8 @@
height: 100%;
width: 100%;
.mat-tab-header {
width: 160px;
flex-flow: column;
.mat-tab-label-container {
.mat-tab-list {
.mat-tab-labels {

View File

@ -320,7 +320,7 @@ $daesang-grey: (
mat-tab-group[vertical] {
display: flex;
flex-direction: row !important;
flex-direction: row;
.mat-tab-labels {
display: flex;

View File

@ -1,40 +1,43 @@
<div>
<mat-list>
<h1 mat-subheader>테마</h1>
<ul class="theme-list">
<!--<ul class="theme-list">
<li
class="theme-box default on"
class="theme-box default"
(click)="onSelectedTabChange('theme-default')"
></li>
<li
class="theme-box lgRed"
(click)="onSelectedTabChange('theme-lgRed')"
></li>
</ul>
<mat-list-item>
<!-- <mat-tab-group
</ul>-->
<mat-list-item class="theme-select">
<mat-tab-group
mat-stretch-tabs
animationDuration="0ms"
(selectedTabChange)="onSelectedTabChange($event)"
fxLayout="row"
class="theme-list"
>
<mat-tab>
<ng-template mat-tab-label>
<ng-template mat-tab-label class="theme-item">
<div class="theme-box default-theme"></div>
<div>기본값</div>
<div class="theme-name">기본값</div>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<ng-template mat-tab-label class="theme-item">
<div class="theme-box lg-red-theme"></div>
<div>LG Red</div>
<div class="theme-name">LG Red</div>
</ng-template>
</mat-tab>
</mat-tab-group> -->
<!--
</mat-tab-group>
<div class="brightness">
<span>기본값</span>
<span>어둡게</span>
<span>밝게</span> -->
<span>밝게</span>
</div>
</mat-list-item>
<mat-divider></mat-divider>

View File

@ -1,11 +1,47 @@
.theme-list {
::ng-deep .mat-list-base {
.theme-select.mat-list-item {
position: relative;
height: 200px;
.mat-list-item-content {
flex-direction: column;
}
}
}
::ng-deep .theme-list {
position: relative;
display: flex;
flex-flow: row;
width: 100%;
margin: 10px;
height: auto !important;
.mat-tab-header {
position: relative;
width: 100% !important;
.mat-tab-labels {
position: relative;
width: 100%;
flex-flow: row !important;
.mat-tab-label {
width: 140px;
height: 120px;
.mat-tab-label-content {
position: relative;
flex-flow: column;
width: 100%;
}
}
}
.mat-ink-bar {
display: none;
}
}
.mat-tab-body-wrapper {
border-left: none;
}
}
.theme-box {
.theme-item {
width: 140px;
height: 98px;
margin-right: 10px;
@ -13,22 +49,24 @@
background-size: 100% auto;
background-repeat: no-repeat;
opacity: 0.7;
&.default {
}
.theme-box {
width: 140px;
height: 98px;
border: 1px solid #dddddd;
background-size: 100% auto;
background-repeat: no-repeat;
&.default-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-default.png');
}
&.lgRed {
&.lg-red-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-lgRed.png');
}
&.on {
border: 1px solid #333333;
opacity: 1;
}
}
.default-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-default.png');
}
.lg-red-theme {
background-image: url('../../../../ucap-webmessenger-app/src/assets/images/theme/theme-lgRed.png');
}
.brightness {
position: relative;
width: 100%;
display: flex;
flex-direction: row;
}