Skip to content

Commit

Permalink
调整分割线的显示方案,调整文档
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 committed Jul 1, 2024
1 parent e3ab4d6 commit 7fc7916
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 32 deletions.
Binary file removed doc/gallery/fastcae.png
Binary file not shown.
Binary file removed doc/gallery/shonDy.png
Binary file not shown.
12 changes: 0 additions & 12 deletions readme-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,15 +687,3 @@ int main(int argc, char* argv[])
```

这个快捷键的创建位置在Mainwidnow,这样快捷键就随着mainwindow周期

# 界面展示

> [FastCAE](http://www.fastcae.com/product.html) CAE软件集成开发平台。
主页:[www.fastcae.com](www.fastcae.com)

![FastCAE](./doc/gallery/fastcae.png)

> [shonDy](https://shoncloud.com) 粒子法流体仿真软件。
主页:[https://shoncloud.com](https://shoncloud.com)

![shonDy](./doc/gallery/shonDy.png)
11 changes: 0 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,14 +684,3 @@ example:
});
```

# Gallery

> [FastCAE](http://www.fastcae.com/product.html) CAE software integrated development platform.
homepage:[www.fastcae.com](www.fastcae.com)

![FastCAE](./doc/gallery/fastcae.png)

> [shonDy](https://shoncloud.com) MPS(Moving particle simulation method) Fluid simulation software.
homepage:[https://shoncloud.com](https://shoncloud.com)

![shonDy](./doc/gallery/shonDy.png)
19 changes: 11 additions & 8 deletions src/SARibbonBar/SARibbonSeparatorWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "SARibbonSeparatorWidget.h"
#include <QApplication>
#include <QScreen>
#include <QStylePainter>
#include <QPainter>
#include <QDebug>
Expand All @@ -7,13 +9,14 @@ SARibbonSeparatorWidget::SARibbonSeparatorWidget(QWidget* parent) : QFrame(paren
{
setFrameShape(QFrame::VLine);
setFrameShadow(QFrame::Plain);
setLineWidth(1);
setMidLineWidth(1);
}

QSize SARibbonSeparatorWidget::sizeHint() const
{
QSize sh = QFrame::sizeHint();
sh.setWidth(1);
return sh;
if(QScreen* screen = QApplication::primaryScreen()){
qreal dpr = screen->physicalDotsPerInch() / screen->logicalDotsPerInch();
int scaledLineWidth = qRound(1.0 * dpr); // 假设基础 lineWidth 是 1
setLineWidth(scaledLineWidth);
// qDebug() << "SARibbonSeparatorWidget:" << scaledLineWidth;
}else{
setLineWidth(1);
}

}
1 change: 0 additions & 1 deletion src/SARibbonBar/SARibbonSeparatorWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class SA_RIBBON_EXPORT SARibbonSeparatorWidget : public QFrame
Q_OBJECT
public:
SARibbonSeparatorWidget(QWidget* parent = nullptr);
virtual QSize sizeHint() const override;
};

#endif // SARIBBONSEPARATORWIDGET_H

0 comments on commit 7fc7916

Please sign in to comment.