223 lines
5.2 KiB
CSS
223 lines
5.2 KiB
CSS
|
|
/**
|
|||
|
|
* 测量面板样式(只做 UI)
|
|||
|
|
*
|
|||
|
|
* 设计目标:
|
|||
|
|
* - 视觉尽量接近截图(深色半透明面板 + 图标按钮网格 + 结果区)
|
|||
|
|
* - 主题颜色尽量使用 CSS 变量,保证可被 ThemeManager / Dialog 主题覆盖
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
.bim-measure-panel {
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
|
|||
|
|
/* 面板内部颜色尽量复用 Dialog 的变量,保证整体一致 */
|
|||
|
|
color: var(--bim-dialog-text-color, #ccc);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 顶部:测量方式按钮区 */
|
|||
|
|
.bim-measure-tools {
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 8px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-grid {
|
|||
|
|
display: grid;
|
|||
|
|
grid-template-columns: repeat(4, 1fr);
|
|||
|
|
gap: 8px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-btn {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 42px;
|
|||
|
|
border-radius: 6px;
|
|||
|
|
border: 1px solid var(--bim-measure-border, rgba(255, 255, 255, 0.12));
|
|||
|
|
background: var(--bim-measure-btn-bg, rgba(255, 255, 255, 0.06));
|
|||
|
|
cursor: pointer;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|||
|
|
padding: 0;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-btn:hover {
|
|||
|
|
background: var(--bim-measure-btn-hover-bg, rgba(255, 255, 255, 0.10));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-btn.is-active {
|
|||
|
|
border-color: var(--bim-measure-active-border, rgba(255, 255, 255, 0.30));
|
|||
|
|
background: var(--bim-measure-btn-active-bg, rgba(255, 255, 255, 0.14));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-icon {
|
|||
|
|
width: 22px;
|
|||
|
|
height: 22px;
|
|||
|
|
display: inline-flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
color: var(--bim-measure-icon-color, #ddd);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-tool-icon svg {
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
fill: currentColor;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle {
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: flex-end;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle-btn {
|
|||
|
|
/* 你要求:更小,并带文字提示 */
|
|||
|
|
height: 22px;
|
|||
|
|
border-radius: 4px;
|
|||
|
|
border: 1px solid var(--bim-measure-border, rgba(255, 255, 255, 0.12));
|
|||
|
|
background: var(--bim-measure-btn-bg, rgba(255, 255, 255, 0.06));
|
|||
|
|
cursor: pointer;
|
|||
|
|
display: inline-flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
transition: background-color 0.15s ease;
|
|||
|
|
padding: 0 6px;
|
|||
|
|
gap: 4px;
|
|||
|
|
font-size: 12px;
|
|||
|
|
line-height: 1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle-btn:hover {
|
|||
|
|
background: var(--bim-measure-btn-hover-bg, rgba(255, 255, 255, 0.10));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle-text {
|
|||
|
|
color: var(--bim-measure-label-color, rgba(255, 255, 255, 0.70));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle-icon svg {
|
|||
|
|
width: 14px;
|
|||
|
|
height: 14px;
|
|||
|
|
fill: currentColor;
|
|||
|
|
color: var(--bim-measure-icon-color, #ddd);
|
|||
|
|
transition: transform 0.15s ease;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-toggle-btn.is-expanded .bim-measure-toggle-icon svg {
|
|||
|
|
transform: rotate(180deg);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 中部:结果展示区 */
|
|||
|
|
.bim-measure-result {
|
|||
|
|
margin-top: 12px;
|
|||
|
|
padding-top: 12px;
|
|||
|
|
border-top: 1px solid var(--bim-measure-divider, rgba(255, 255, 255, 0.10));
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-row {
|
|||
|
|
display: flex;
|
|||
|
|
align-items: baseline;
|
|||
|
|
gap: 8px;
|
|||
|
|
font-size: 13px;
|
|||
|
|
line-height: 1.4;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-row .label {
|
|||
|
|
color: var(--bim-measure-label-color, rgba(255, 255, 255, 0.70));
|
|||
|
|
min-width: 84px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-row .value {
|
|||
|
|
color: var(--bim-measure-value-color, rgba(255, 255, 255, 0.90));
|
|||
|
|
flex: 1;
|
|||
|
|
word-break: break-word;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-xyz {
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 6px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-xyz .value {
|
|||
|
|
font-variant-numeric: tabular-nums;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 底部:操作区(删除全部 / 设置) */
|
|||
|
|
.bim-measure-footer {
|
|||
|
|
margin-top: 12px;
|
|||
|
|
padding-top: 10px;
|
|||
|
|
border-top: 1px solid var(--bim-measure-divider, rgba(255, 255, 255, 0.10));
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
/* 你要求:底部不要“占满”交互区域,按钮按自身尺寸布局 */
|
|||
|
|
justify-content: flex-start;
|
|||
|
|
gap: 10px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-clear-btn {
|
|||
|
|
background: transparent;
|
|||
|
|
border: none;
|
|||
|
|
color: var(--bim-measure-danger, white); /* 先用偏绿(接近截图),可由主题覆盖 */
|
|||
|
|
cursor: pointer;
|
|||
|
|
/* 缩小可点击区域:仅文字本身附近 */
|
|||
|
|
padding: 0;
|
|||
|
|
font-size: 13px;
|
|||
|
|
/* 防止外部环境(如 demo)给 button 设置 flex: 1 导致“各占一半” */
|
|||
|
|
flex: 0 0 auto !important;
|
|||
|
|
width: auto;
|
|||
|
|
min-width: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 你要求:删除按钮不需要 hover 效果 */
|
|||
|
|
.bim-measure-clear-btn:hover,
|
|||
|
|
.bim-measure-clear-btn:active,
|
|||
|
|
.bim-measure-clear-btn:focus {
|
|||
|
|
background: transparent;
|
|||
|
|
border: none;
|
|||
|
|
outline: none;
|
|||
|
|
text-decoration: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-settings-btn {
|
|||
|
|
/* 你要求:管理(设置)按钮去掉边框与 hover;按钮按自身尺寸即可 */
|
|||
|
|
width: 24px;
|
|||
|
|
height: 24px;
|
|||
|
|
border-radius: 4px;
|
|||
|
|
border: none;
|
|||
|
|
background: transparent;
|
|||
|
|
cursor: pointer;
|
|||
|
|
display: inline-flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
padding: 0;
|
|||
|
|
/* 右侧对齐,但不扩大可点击区域 */
|
|||
|
|
margin-left: auto;
|
|||
|
|
/* 防止外部环境(如 demo)给 button 设置 flex: 1 导致“各占一半” */
|
|||
|
|
flex: 0 0 auto !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 你要求:设置按钮不需要 hover 效果 */
|
|||
|
|
.bim-measure-settings-btn:hover,
|
|||
|
|
.bim-measure-settings-btn:active,
|
|||
|
|
.bim-measure-settings-btn:focus {
|
|||
|
|
background: transparent;
|
|||
|
|
border: none;
|
|||
|
|
outline: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bim-measure-settings-btn svg {
|
|||
|
|
width: 18px;
|
|||
|
|
height: 18px;
|
|||
|
|
fill: currentColor;
|
|||
|
|
color: var(--bim-measure-icon-color, #ddd);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|