refactor/pure-qt-ui #3

Merged
gaozheng merged 56 commits from refactor/pure-qt-ui into main 2026-06-10 18:41:53 +08:00
3 changed files with 4 additions and 8 deletions
Showing only changes of commit 2be49b205c - Show all commits

View File

@ -63,6 +63,7 @@ QWidget* makeActionButton(QWidget* parent, const HeaderAction& a)
{
auto* btn = new ElaIconButton(
makeGlyph(a.first, QColor("#5A6B85"), kActionIcon).pixmap(kActionIcon, kActionIcon), parent);
btn->setFixedSize(30, 30); // QPixmap 构造不设尺寸,显式固定防变形
btn->setCursor(Qt::PointingHandCursor);
btn->setToolTip(a.second + QStringLiteral("(占位)"));
return btn;

View File

@ -27,13 +27,7 @@ QWidget {
QMainWindow, QDialog {
background: #F4F6FA;
}
QToolTip {
background: #1F2A3D;
color: #F4F6FA;
border: 1px solid #2D6CB5;
border-radius: 6px;
padding: 4px 8px;
}
/* QToolTip 不写 QSS用系统原生工具提示自定义 QSS 会让弹窗圆角露直角、且不像原生)。 */
/* ── 视图内工具条2D/3D、数据详情白底分段控件柔和不刺眼 ── */
QToolBar {

View File

@ -42,9 +42,10 @@ QFrame* makeDivider(QWidget* parent)
}
// 右侧图标按钮Fluent ElaIconButton自带图标字体 + 悬停 + 随主题着色)。
// 用带固定宽高的构造(icon, 字号, 宽, 高, parent)——否则图标会被压扁变形。
QWidget* makeIconButton(QWidget* parent, ElaIconType::IconName icon, const QString& tip)
{
auto* btn = new ElaIconButton(icon, kToolIcon, parent);
auto* btn = new ElaIconButton(icon, 18, 34, 34, parent);
btn->setToolTip(tip);
btn->setCursor(Qt::PointingHandCursor);
return btn;