Fixed issue #26.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-03 23:02:51 +02:00
parent 20e22439c9
commit 7d51c4cf4f
20 changed files with 65 additions and 1 deletions

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

21
share/resources/theme.qrc Normal file
View 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>

View File

@ -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);