mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Fix : element prefix don't work with custom path of user elements collection
See post at https://qelectrotech.org/forum/viewtopic.php?pid=10593#p10593
This commit is contained in:
@@ -550,7 +550,7 @@ QString QETApp::commonElementsDir()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QETApp::customElementsDir
|
* @brief QETApp::customElementsDir
|
||||||
* @return the dir path of user elements collection
|
* @return the dir path of user elements collection ened by a "/" separator
|
||||||
*/
|
*/
|
||||||
QString QETApp::customElementsDir()
|
QString QETApp::customElementsDir()
|
||||||
{
|
{
|
||||||
@@ -564,6 +564,9 @@ QString QETApp::customElementsDir()
|
|||||||
if (dir.exists())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
m_user_custom_elements_dir = path;
|
m_user_custom_elements_dir = path;
|
||||||
|
if(!m_user_custom_elements_dir.endsWith("/")) {
|
||||||
|
m_user_custom_elements_dir.append("/");
|
||||||
|
}
|
||||||
return m_user_custom_elements_dir;
|
return m_user_custom_elements_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1232,13 +1235,13 @@ if defined(Q_OS_WIN)
|
|||||||
void QETApp::useSystemPalette(bool use) {
|
void QETApp::useSystemPalette(bool use) {
|
||||||
if (use) {
|
if (use) {
|
||||||
qApp->setPalette(initial_palette_);
|
qApp->setPalette(initial_palette_);
|
||||||
qApp->setStyleSheet(
|
qApp->setStyleSheet(
|
||||||
"QTabBar::tab:!selected { background-color: transparent; }"
|
"QTabBar::tab:!selected { background-color: transparent; }"
|
||||||
"QTabBar::tab:selected { background-color: transparent; font: bold; color: black;}"
|
"QTabBar::tab:selected { background-color: transparent; font: bold; color: black;}"
|
||||||
"QAbstractScrollArea#mdiarea {"
|
"QAbstractScrollArea#mdiarea {"
|
||||||
"background-color -> setPalette(initial_palette_);"
|
"background-color -> setPalette(initial_palette_);"
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
QFile file(configDir() + "style.css");
|
QFile file(configDir() + "style.css");
|
||||||
file.open(QFile::ReadOnly);
|
file.open(QFile::ReadOnly);
|
||||||
|
|||||||
Reference in New Issue
Block a user