|
@ -43,7 +43,8 @@ include(src/xml/xml.pri)
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
share/resources/icon.qrc \
|
share/resources/icon.qrc \
|
||||||
share/resources/cursor.qrc
|
share/resources/cursor.qrc \
|
||||||
|
share/resources/theme.qrc
|
||||||
|
|
||||||
OTHER_FILES += share/resources/valentina.rc \
|
OTHER_FILES += share/resources/valentina.rc \
|
||||||
share/resources/icon/64x64/icon64x64.ico
|
share/resources/icon/64x64/icon64x64.ico
|
||||||
|
|
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 688 B |
After Width: | Height: | Size: 688 B |
BIN
share/resources/icons/win.icon.theme/24x24/actions/document-new.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
share/resources/icons/win.icon.theme/24x24/actions/document-open.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
share/resources/icons/win.icon.theme/24x24/actions/document-save-as.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
share/resources/icons/win.icon.theme/24x24/actions/document-save.png
Executable file
After Width: | Height: | Size: 891 B |
BIN
share/resources/icons/win.icon.theme/32x32/actions/document-new.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
BIN
share/resources/icons/win.icon.theme/32x32/actions/document-save-as.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
29
share/resources/icons/win.icon.theme/index.theme
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
[Icon Theme]
|
||||||
|
Name=win.icon.theme
|
||||||
|
Comment=win.icon.theme for valentina
|
||||||
|
Inherits=gnome,hicolor
|
||||||
|
Example=x-directory-normal
|
||||||
|
|
||||||
|
#Directories
|
||||||
|
Directories=16x16/actions,24x24/actions,32x32/actions,scalable/actions
|
||||||
|
|
||||||
|
[16x16/actions]
|
||||||
|
Size=16
|
||||||
|
Context=Actions
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[24x24/actions]
|
||||||
|
Size=24
|
||||||
|
Context=Actions
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[32x32/actions]
|
||||||
|
Size=32
|
||||||
|
Context=Actions
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[scalable/actions]
|
||||||
|
Size=128
|
||||||
|
Context=Actions
|
||||||
|
Type=scalable
|
||||||
|
|
BIN
share/resources/icons/win.icon.theme/scalable/actions/document-new.png
Executable file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
share/resources/icons/win.icon.theme/scalable/actions/document-save-as.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
share/resources/icons/win.icon.theme/scalable/actions/document-save.png
Executable file
After Width: | Height: | Size: 18 KiB |
21
share/resources/theme.qrc
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/icons/win.icon.theme">
|
||||||
|
<file alias="index.theme">icons/win.icon.theme/index.theme</file>
|
||||||
|
<file alias="16x16/actions/document-new.png">icons/win.icon.theme/16x16/actions/document-new.png</file>
|
||||||
|
<file alias="16x16/actions/document-open.png">icons/win.icon.theme/16x16/actions/document-open.png</file>
|
||||||
|
<file alias="16x16/actions/document-save.png">icons/win.icon.theme/16x16/actions/document-save.png</file>
|
||||||
|
<file alias="16x16/actions/document-save-as.png">icons/win.icon.theme/16x16/actions/document-save-as.png</file>
|
||||||
|
<file alias="24x24/actions/document-new.png">icons/win.icon.theme/24x24/actions/document-new.png</file>
|
||||||
|
<file alias="24x24/actions/document-open.png">icons/win.icon.theme/24x24/actions/document-open.png</file>
|
||||||
|
<file alias="24x24/actions/document-save.png">icons/win.icon.theme/24x24/actions/document-save.png</file>
|
||||||
|
<file alias="24x24/actions/document-save-as.png">icons/win.icon.theme/24x24/actions/document-save-as.png</file>
|
||||||
|
<file alias="32x32/actions/document-new.png">icons/win.icon.theme/32x32/actions/document-new.png</file>
|
||||||
|
<file alias="32x32/actions/document-open.png">icons/win.icon.theme/32x32/actions/document-open.png</file>
|
||||||
|
<file alias="32x32/actions/document-save.png">icons/win.icon.theme/32x32/actions/document-save.png</file>
|
||||||
|
<file alias="32x32/actions/document-save-as.png">icons/win.icon.theme/32x32/actions/document-save-as.png</file>
|
||||||
|
<file alias="scalable/actions/document-new.png">icons/win.icon.theme/scalable/actions/document-new.png</file>
|
||||||
|
<file alias="scalable/actions/document-open.png">icons/win.icon.theme/scalable/actions/document-open.png</file>
|
||||||
|
<file alias="scalable/actions/document-save.png">icons/win.icon.theme/scalable/actions/document-save.png</file>
|
||||||
|
<file alias="scalable/actions/document-save-as.png">icons/win.icon.theme/scalable/actions/document-save-as.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -63,6 +63,19 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
mode(Draw::Calculation), currentDrawIndex(0)
|
mode(Draw::Calculation), currentDrawIndex(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
static const char * GENERIC_ICON_TO_CHECK = "document-open";
|
||||||
|
static const char * FALLBACK_ICON_THEME = "win.icon.theme";
|
||||||
|
if (!QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK)) {
|
||||||
|
//If there is no default working icon theme then we should
|
||||||
|
//use an icon theme that we provide via a .qrc file
|
||||||
|
//This case happens under Windows and Mac OS X
|
||||||
|
//This does not happen under GNOME or KDE
|
||||||
|
QIcon::setThemeName(FALLBACK_ICON_THEME);
|
||||||
|
ui->actionNew->setIcon(QIcon::fromTheme("document-new"));
|
||||||
|
ui->actionOpen->setIcon(QIcon::fromTheme("document-open"));
|
||||||
|
ui->actionSave->setIcon(QIcon::fromTheme("document-save"));
|
||||||
|
ui->actionSaveAs->setIcon(QIcon::fromTheme("document-save-as"));
|
||||||
|
}
|
||||||
ToolBarOption();
|
ToolBarOption();
|
||||||
ToolBarDraws();
|
ToolBarDraws();
|
||||||
QRectF sceneRect = QRectF(0, 0, PaperSize, PaperSize);
|
QRectF sceneRect = QRectF(0, 0, PaperSize, PaperSize);
|
||||||
|
|