Skip to content

Commit 5efc728

Browse files
AlexandrKudryaiakov
authored andcommitted
fix: little fixes
1 parent e666d55 commit 5efc728

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

qrgui/brandManager/styles.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,60 +37,60 @@ class Styles
3737
/// Returns json stylesheet for start tab background
3838
virtual QString startTabBackgroundStyle() const
3939
{
40-
return placeStyle(utils::InFile::readAll(startTabBackgroundStylePath()));
40+
return loadSystemPallete(utils::InFile::readAll(startTabBackgroundStylePath()));
4141
}
4242

4343
/// Returns json stylesheet for start tab substrate background
4444
virtual QString startTabSubstrateBackgroundStyle() const
4545
{
46-
return placeStyle(utils::InFile::readAll(startTabSubstrateBackgroundStylePath()));
46+
return loadSystemPallete(utils::InFile::readAll(startTabSubstrateBackgroundStylePath()));
4747
}
4848

4949
/// Returns json stylesheet for start tab header background
5050
virtual QString startTabHeaderBackgroundStyle() const
5151
{
52-
return placeStyle(utils::InFile::readAll(startTabHeaderBackgroundStylePath()));
52+
return loadSystemPallete(utils::InFile::readAll(startTabHeaderBackgroundStylePath()));
5353
}
5454

5555
/// Returns json stylesheet for recent projects section background on start tab
5656
virtual QString startTabRecentProjectsBackgroundStyle() const
5757
{
58-
return placeStyle(utils::InFile::readAll(startTabRecentProjectsBackgroundStylePath()));
58+
return loadSystemPallete(utils::InFile::readAll(startTabRecentProjectsBackgroundStylePath()));
5959
}
6060

6161
/// Returns json stylesheet for projects management section background on start tab
6262
virtual QString startTabProjectsManagementBackgroundStyle() const
6363
{
64-
return placeStyle(utils::InFile::readAll(startTabProjectsManagementBackgroundStylePath()));
64+
return loadSystemPallete(utils::InFile::readAll(startTabProjectsManagementBackgroundStylePath()));
6565
}
6666

6767
/// Returns json stylesheet for command buttons on start tab
6868
virtual QString startTabButtonStyle() const
6969
{
70-
return placeStyle(utils::InFile::readAll(startTabButtonStylePath()));
70+
return loadSystemPallete(utils::InFile::readAll(startTabButtonStylePath()));
7171
}
7272

7373
/// Returns json stylesheet for styled text on start tab of level 1 heading
7474
virtual QString startTabLabelLevel1Style() const
7575
{
76-
return placeStyle(utils::InFile::readAll(startTabLabelLevel1StylePath()));
76+
return loadSystemPallete(utils::InFile::readAll(startTabLabelLevel1StylePath()));
7777
}
7878

7979
/// Returns json stylesheet for styled text on start tab of level 2 heading
8080
virtual QString startTabLabelLevel2Style() const
8181
{
82-
return placeStyle(utils::InFile::readAll(startTabLabelLevel2StylePath()));
82+
return loadSystemPallete(utils::InFile::readAll(startTabLabelLevel2StylePath()));
8383
}
8484

8585
virtual QString splashscreenStyle() const
8686
{
87-
return placeStyle(utils::InFile::readAll(splashscreenStylePath()));
87+
return loadSystemPallete(utils::InFile::readAll(splashscreenStylePath()));
8888
}
8989

9090
protected:
9191

9292
///
93-
QString placeStyle(QString style) const {
93+
QString loadSystemPallete(QString style) const {
9494
auto systemPalette(QApplication::palette());
9595
return style
9696
.replace("@@Window@@", systemPalette.color(QPalette::Window).name())

qrgui/editor/labels/label.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ void Label::init()
5858
QGraphicsTextItem::setFlags(ItemIsSelectable);
5959
QGraphicsTextItem::setDefaultTextColor(Qt::black);
6060
connect(document(), &QTextDocument::contentsChanged, this, &Label::saveToRepo);
61-
6261
reinitFont();
6362
setRotation(mProperties->rotation());
6463
if (!mProperties->isStatic()) {

qrgui/mainWindow/mainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ MainWindow::MainWindow(const QString &fileToOpen)
116116
, mInitialFileToOpen(fileToOpen)
117117
{
118118
QLOG_INFO() << "MainWindow: screen DPI is" << logicalDpiX();
119+
initPalette();
119120
mUi->setupUi(this);
120121
mUi->paletteTree->initMainWindow(this);
121122
setWindowTitle("QReal");
@@ -130,7 +131,6 @@ MainWindow::MainWindow(const QString &fileToOpen)
130131
mTextManager.reset(new text::TextManager(mFacade->events(), *this));
131132
mProjectManager.reset(new ProjectManagerWrapper(this, &*mTextManager));
132133

133-
initPalette();
134134
initRecentProjectsMenu();
135135
customizeWindow();
136136
initTabs();

0 commit comments

Comments
 (0)