mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] refactoring
This commit is contained in:
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
@ -162,17 +162,17 @@ QPushButton::menu-indicator:hover {
|
||||
border-image: url(:/res/icons/menu-indicator.png) 0 10 0 0 repeat repeat;
|
||||
}
|
||||
|
||||
QPushButton[theme=dark]::menu-indicator {
|
||||
border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 0 repeat repeat;
|
||||
}
|
||||
/*QPushButton[theme=dark]::menu-indicator {*/
|
||||
/*border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 0 repeat repeat;*/
|
||||
/*}*/
|
||||
|
||||
QPushButton[theme=dark]::menu-indicator:disabled {
|
||||
border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 10 repeat repeat;
|
||||
}
|
||||
/*QPushButton[theme=dark]::menu-indicator:disabled {*/
|
||||
/*border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 10 repeat repeat;*/
|
||||
/*}*/
|
||||
|
||||
QPushButton[theme=dark]::menu-indicator:hover {
|
||||
border-image: url(:/res/icons/menu-indicator-dark.png) 0 10 0 0 repeat repeat;
|
||||
}
|
||||
/*QPushButton[theme=dark]::menu-indicator:hover {*/
|
||||
/*border-image: url(:/res/icons/menu-indicator-dark.png) 0 10 0 0 repeat repeat;*/
|
||||
/*}*/
|
||||
|
||||
QPushButton#toolButtonDownload {
|
||||
/*background-repeat: no-repeat;*/
|
||||
|
||||
@ -53,13 +53,13 @@ QPushButton::menu-indicator:hover {
|
||||
border-image: url(:/menu-indicator_2x.png) 0 20 0 0 repeat repeat;
|
||||
}
|
||||
|
||||
QPushButton[theme=dark]::menu-indicator:disabled {
|
||||
border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 20 repeat repeat;
|
||||
}
|
||||
/*QPushButton[theme=dark]::menu-indicator:disabled {*/
|
||||
/*border-image: url(:/res/icons/menu-indicator-dark.png) 0 0 0 20 repeat repeat;*/
|
||||
/*}*/
|
||||
|
||||
QPushButton[theme=dark]::menu-indicator:hover {
|
||||
border-image: url(:/res/icons/menu-indicator-dark.png) 0 20 0 0 repeat repeat;
|
||||
}
|
||||
/*QPushButton[theme=dark]::menu-indicator:hover {*/
|
||||
/*border-image: url(:/res/icons/menu-indicator-dark.png) 0 20 0 0 repeat repeat;*/
|
||||
/*}*/
|
||||
|
||||
QPushButton#toolButtonDownload::menu-indicator {
|
||||
top: -20px;
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<file>res/icons/menu-indicator.png</file>
|
||||
<file>res/icons/menu-indicator-dark.png</file>
|
||||
<file alias="menu-indicator_1.5x.png">res/icons/menu-indicator@1.5x.png</file>
|
||||
<file>res/icons/menu-indicator_2x.png</file>
|
||||
<file alias="menu-indicator_2x.png">res/icons/menu-indicator@2x.png</file>
|
||||
<file>res/icons/radiobox.png</file>
|
||||
<file alias="radiobox_2x.png">res/icons/radiobox@2x.png</file>
|
||||
<file>res/icons/checkbox.png</file>
|
||||
|
||||
@ -46,13 +46,15 @@
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
# include <shobjidl.h>
|
||||
# include <QOperatingSystemVersion>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static DWORD win_ver_major{0};
|
||||
//static DWORD win_ver_major{0};
|
||||
static const int win_ver_major = QOperatingSystemVersion::current().majorVersion();
|
||||
using VectorShellItems = vector<IShellItem *>;
|
||||
|
||||
auto itemsFromItemArray(IShellItemArray * items)
|
||||
@ -416,15 +418,15 @@ QStringList CFileDialogWrapper::modalOpen(const QString& path, const QString& fi
|
||||
args.multiSelect = multi;
|
||||
args.folder = path.toStdWString();
|
||||
|
||||
if ( win_ver_major == 0 ) {
|
||||
OSVERSIONINFO osvi;
|
||||
// if ( win_ver_major == 0 ) {
|
||||
// OSVERSIONINFO osvi;
|
||||
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
// ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
// osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
|
||||
GetVersionEx(&osvi);
|
||||
win_ver_major = osvi.dwMajorVersion;
|
||||
}
|
||||
// GetVersionEx(&osvi);
|
||||
// win_ver_major = osvi.dwMajorVersion;
|
||||
// }
|
||||
|
||||
// Win XP doesn't support IFileOpenDialog
|
||||
if ( win_ver_major > 5 ) {
|
||||
|
||||
Reference in New Issue
Block a user