- 기본 스타일을 위한 UTKDefaultStyle.uss파일을 생성했습니다. - UIToolkit 설정 구성을 위한 UTKSettings.asset 파일을 추가했습니다. - 포괄적인 색상 정의를 포함하는 다크 및 라이트 테마 스타일(UTKThemeDark.uss, UTKThemeLight.uss)을 도입했습니다. - 테마에 독립적인 레이아웃 및 크기 변수를 위한 UTKVariables.uss를 구현했습니다. - 스타일 및 이벤트 처리를 통해 열거형 선택을 위한 사용자 지정 드롭다운 컴포넌트(UTKEnumDropDown)를 개발했습니다. - 사용자 지정 스타일 및 이벤트 관리를 통해 각각 이중 입력 필드와 긴 입력 필드를 위한 UTKDoubleField 및 UTKLongField 컴포넌트를 생성했습니다.
235 lines
4.8 KiB
Plaintext
235 lines
4.8 KiB
Plaintext
/*
|
|
* ===================================
|
|
* UTKStyleGuideSample.uss
|
|
* Style Guide Sample Theme-aware Styles
|
|
* ===================================
|
|
*
|
|
* Uses theme variables for Light/Dark theme support.
|
|
* Color variables are defined in UTKThemeDark.uss / UTKThemeLight.uss.
|
|
*/
|
|
|
|
/* ===================================
|
|
Main Container
|
|
=================================== */
|
|
|
|
.utk-sample-main {
|
|
flex-direction: column;
|
|
background-color: var(--color-bg-base);
|
|
flex-grow: 1;
|
|
}
|
|
|
|
/* ===================================
|
|
Header
|
|
=================================== */
|
|
|
|
.utk-sample-header {
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16px 24px;
|
|
background-color: var(--color-bg-elevated);
|
|
border-bottom-width: 1px;
|
|
border-bottom-color: var(--color-border);
|
|
}
|
|
|
|
.utk-sample-title {
|
|
font-size: 24px;
|
|
-unity-font-style: bold;
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.utk-sample-theme-area {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
}
|
|
|
|
.utk-sample-theme-label {
|
|
font-size: 14px;
|
|
color: var(--color-text-secondary);
|
|
margin-right: 16px;
|
|
}
|
|
|
|
/* ===================================
|
|
Content (Sidebar + Preview)
|
|
=================================== */
|
|
|
|
.utk-sample-content {
|
|
flex-direction: row;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
/* ===================================
|
|
Sidebar
|
|
=================================== */
|
|
|
|
.utk-sample-sidebar {
|
|
width: 280px;
|
|
min-width: 280px;
|
|
background-color: var(--color-bg-secondary);
|
|
border-right-width: 1px;
|
|
border-right-color: var(--color-border);
|
|
}
|
|
|
|
.utk-sample-sidebar-scroll {
|
|
flex-grow: 1;
|
|
padding: 16px;
|
|
}
|
|
|
|
.utk-sample-sidebar-scroll > .utk-foldout {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* ===================================
|
|
Control Item (in sidebar)
|
|
=================================== */
|
|
|
|
.utk-sample-control-item {
|
|
padding: 8px 12px;
|
|
margin: 2px 0;
|
|
border-radius: 4px;
|
|
cursor: resource('UIToolkit/Images/cursor_point_white_32') 14 5;
|
|
transition-duration: 0.15s;
|
|
transition-property: background-color;
|
|
}
|
|
|
|
.utk-sample-control-item:hover {
|
|
background-color: var(--color-btn-hover);
|
|
}
|
|
|
|
.utk-sample-control-item--selected {
|
|
background-color: var(--color-btn-primary);
|
|
}
|
|
|
|
.utk-sample-control-item--selected:hover {
|
|
background-color: var(--color-btn-primary-hover);
|
|
}
|
|
|
|
.utk-sample-control-item > Label {
|
|
font-size: 13px;
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.utk-sample-control-item--selected > Label {
|
|
color: var(--color-text-on-primary);
|
|
}
|
|
|
|
/* ===================================
|
|
Preview Area
|
|
=================================== */
|
|
|
|
.utk-sample-preview {
|
|
flex-grow: 1;
|
|
flex-direction: column;
|
|
background-color: var(--color-bg-base);
|
|
}
|
|
|
|
.utk-sample-preview-title {
|
|
font-size: 20px;
|
|
-unity-font-style: bold;
|
|
color: var(--color-text-primary);
|
|
padding: 20px 24px;
|
|
background-color: var(--color-bg-elevated);
|
|
border-bottom-width: 1px;
|
|
border-bottom-color: var(--color-border);
|
|
}
|
|
|
|
.utk-sample-preview-scroll {
|
|
flex-grow: 1;
|
|
padding: 24px;
|
|
}
|
|
|
|
.utk-sample-preview-content {
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* ===================================
|
|
Section (in preview)
|
|
=================================== */
|
|
|
|
.utk-sample-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.utk-sample-section__title {
|
|
font-size: 14px;
|
|
-unity-font-style: bold;
|
|
color: var(--color-text-secondary);
|
|
margin-bottom: 12px;
|
|
padding-bottom: 8px;
|
|
border-bottom-width: 1px;
|
|
border-bottom-color: var(--color-border-light);
|
|
}
|
|
|
|
.utk-sample-section__desc {
|
|
font-size: 13px;
|
|
color: var(--color-text-secondary);
|
|
margin-bottom: 20px;
|
|
padding: 12px 16px;
|
|
background-color: var(--color-bg-secondary);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
/* ===================================
|
|
Row (horizontal layout)
|
|
=================================== */
|
|
|
|
.utk-sample-row {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.utk-sample-row > * {
|
|
margin-right: 12px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* ===================================
|
|
Legacy Styles (backward compatibility)
|
|
=================================== */
|
|
|
|
.utk-sample-stepper-row {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.utk-sample-stepper-label {
|
|
width: 100px;
|
|
font-size: 13px;
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.utk-sample-button-row {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.utk-sample-button-row > * {
|
|
margin-right: 10px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.utk-sample-slider-row {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.utk-sample-slider-row > Label {
|
|
min-width: 80px;
|
|
}
|
|
|
|
.utk-sample-card-row {
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.utk-sample-card-row > * {
|
|
margin-right: 15px;
|
|
margin-bottom: 10px;
|
|
}
|