Added some fallback icons.

This commit is contained in:
Jim Evins
2013-10-27 12:16:45 -04:00
parent c39d95f2b1
commit ddfedb55cc
15 changed files with 142 additions and 12 deletions
+118
View File
@@ -306,6 +306,124 @@ namespace gLabels
} }
}; };
/*
* Fallback Icons. These are fallbacks for icons that would normally come from the current theme,
* if supported. These icons are copied from the mate-icon-theme (GPL-v3 or CC-BY-SA-v3).
*/
namespace Fallback
{
class EditCopy : public QIcon
{
public:
EditCopy()
{
addFile( ":icons/24x24/actions/fallback-edit-copy.png" );
}
};
class EditCut : public QIcon
{
public:
EditCut()
{
addFile( ":icons/24x24/actions/fallback-edit-cut.png" );
}
};
class EditPaste : public QIcon
{
public:
EditPaste()
{
addFile( ":icons/24x24/actions/fallback-edit-paste.png" );
}
};
class FileNew : public QIcon
{
public:
FileNew()
{
addFile( ":icons/24x24/actions/fallback-file-new.png" );
}
};
class FileOpen : public QIcon
{
public:
FileOpen()
{
addFile( ":icons/24x24/actions/fallback-file-open.png" );
}
};
class FilePrint : public QIcon
{
public:
FilePrint()
{
addFile( ":icons/24x24/actions/fallback-file-print.png" );
}
};
class FileSave : public QIcon
{
public:
FileSave()
{
addFile( ":icons/24x24/actions/fallback-file-save.png" );
}
};
class FileSaveAs : public QIcon
{
public:
FileSaveAs()
{
addFile( ":icons/24x24/actions/fallback-file-save-as.png" );
}
};
class ZoomBestFit : public QIcon
{
public:
ZoomBestFit()
{
addFile( ":icons/24x24/actions/fallback-zoom-best-fit.png" );
}
};
class ZoomIn : public QIcon
{
public:
ZoomIn()
{
addFile( ":icons/24x24/actions/fallback-zoom-in.png" );
}
};
class ZoomOriginal : public QIcon
{
public:
ZoomOriginal()
{
addFile( ":icons/24x24/actions/fallback-zoom-original.png" );
}
};
class ZoomOut : public QIcon
{
public:
ZoomOut()
{
addFile( ":icons/24x24/actions/fallback-zoom-out.png" );
}
};
}
} }
} }
+12 -12
View File
@@ -62,31 +62,31 @@ namespace gLabels
{ {
/* File actions */ /* File actions */
fileNewAction = new QAction( tr("&New..."), this ); fileNewAction = new QAction( tr("&New..."), this );
fileNewAction->setIcon( QIcon::fromTheme( "document-new" ) ); fileNewAction->setIcon( QIcon::fromTheme( "document-new", Icons::Fallback::FileNew() ) );
fileNewAction->setShortcut( QKeySequence::New ); fileNewAction->setShortcut( QKeySequence::New );
fileNewAction->setStatusTip( tr("Create a new file") ); fileNewAction->setStatusTip( tr("Create a new file") );
connect( fileNewAction, SIGNAL(triggered()), this, SLOT(fileNew()) ); connect( fileNewAction, SIGNAL(triggered()), this, SLOT(fileNew()) );
fileOpenAction = new QAction( tr("&Open..."), this ); fileOpenAction = new QAction( tr("&Open..."), this );
fileOpenAction->setIcon( QIcon::fromTheme( "document-open" ) ); fileOpenAction->setIcon( QIcon::fromTheme( "document-open", Icons::Fallback::FileOpen() ) );
fileOpenAction->setShortcut( QKeySequence::Open ); fileOpenAction->setShortcut( QKeySequence::Open );
fileOpenAction->setStatusTip( tr("Open a file") ); fileOpenAction->setStatusTip( tr("Open a file") );
connect( fileOpenAction, SIGNAL(triggered()), this, SLOT(fileOpen()) ); connect( fileOpenAction, SIGNAL(triggered()), this, SLOT(fileOpen()) );
fileSaveAction = new QAction( tr("&Save"), this ); fileSaveAction = new QAction( tr("&Save"), this );
fileSaveAction->setIcon( QIcon::fromTheme( "document-save" ) ); fileSaveAction->setIcon( QIcon::fromTheme( "document-save", Icons::Fallback::FileSave() ) );
fileSaveAction->setShortcut( QKeySequence::Save ); fileSaveAction->setShortcut( QKeySequence::Save );
fileSaveAction->setStatusTip( tr("Save current file") ); fileSaveAction->setStatusTip( tr("Save current file") );
connect( fileSaveAction, SIGNAL(triggered()), this, SLOT(fileSave()) ); connect( fileSaveAction, SIGNAL(triggered()), this, SLOT(fileSave()) );
fileSaveAsAction = new QAction( tr("Save &As..."), this ); fileSaveAsAction = new QAction( tr("Save &As..."), this );
fileSaveAsAction->setIcon( QIcon::fromTheme( "document-save-as" ) ); fileSaveAsAction->setIcon( QIcon::fromTheme( "document-save-as", Icons::Fallback::FileSaveAs() ) );
fileSaveAsAction->setShortcut( QKeySequence::SaveAs ); fileSaveAsAction->setShortcut( QKeySequence::SaveAs );
fileSaveAsAction->setStatusTip( tr("Save current file to a different name") ); fileSaveAsAction->setStatusTip( tr("Save current file to a different name") );
connect( fileSaveAsAction, SIGNAL(triggered()), this, SLOT(fileSaveAs()) ); connect( fileSaveAsAction, SIGNAL(triggered()), this, SLOT(fileSaveAs()) );
filePrintAction = new QAction( tr("&Print..."), this ); filePrintAction = new QAction( tr("&Print..."), this );
filePrintAction->setIcon( QIcon::fromTheme( "document-print" ) ); filePrintAction->setIcon( QIcon::fromTheme( "document-print", Icons::Fallback::FilePrint() ) );
filePrintAction->setShortcut( QKeySequence::Print ); filePrintAction->setShortcut( QKeySequence::Print );
filePrintAction->setStatusTip( tr("Print the current file") ); filePrintAction->setStatusTip( tr("Print the current file") );
connect( filePrintAction, SIGNAL(triggered()), this, SLOT(filePrint()) ); connect( filePrintAction, SIGNAL(triggered()), this, SLOT(filePrint()) );
@@ -127,19 +127,19 @@ namespace gLabels
connect( editRedoAction, SIGNAL(triggered()), this, SLOT(editRedo()) ); connect( editRedoAction, SIGNAL(triggered()), this, SLOT(editRedo()) );
editCutAction = new QAction( tr("Cut"), this ); editCutAction = new QAction( tr("Cut"), this );
editCutAction->setIcon( QIcon::fromTheme( "edit-cut" ) ); editCutAction->setIcon( QIcon::fromTheme( "edit-cut", Icons::Fallback::EditCut() ) );
editCutAction->setShortcut( QKeySequence::Cut ); editCutAction->setShortcut( QKeySequence::Cut );
editCutAction->setStatusTip( tr("Cut the selection") ); editCutAction->setStatusTip( tr("Cut the selection") );
connect( editCutAction, SIGNAL(triggered()), this, SLOT(editCut()) ); connect( editCutAction, SIGNAL(triggered()), this, SLOT(editCut()) );
editCopyAction = new QAction( tr("&Copy"), this ); editCopyAction = new QAction( tr("&Copy"), this );
editCopyAction->setIcon( QIcon::fromTheme( "edit-copy" ) ); editCopyAction->setIcon( QIcon::fromTheme( "edit-copy", Icons::Fallback::EditCopy() ) );
editCopyAction->setShortcut( QKeySequence::Copy ); editCopyAction->setShortcut( QKeySequence::Copy );
editCopyAction->setStatusTip( tr("Copy the selection") ); editCopyAction->setStatusTip( tr("Copy the selection") );
connect( editCopyAction, SIGNAL(triggered()), this, SLOT(editCopy()) ); connect( editCopyAction, SIGNAL(triggered()), this, SLOT(editCopy()) );
editPasteAction = new QAction( tr("&Paste"), this ); editPasteAction = new QAction( tr("&Paste"), this );
editPasteAction->setIcon( QIcon::fromTheme( "edit-paste" ) ); editPasteAction->setIcon( QIcon::fromTheme( "edit-paste", Icons::Fallback::EditPaste() ) );
editPasteAction->setShortcut( QKeySequence::Paste ); editPasteAction->setShortcut( QKeySequence::Paste );
editPasteAction->setStatusTip( tr("Paste the clipboard") ); editPasteAction->setStatusTip( tr("Paste the clipboard") );
connect( editPasteAction, SIGNAL(triggered()), this, SLOT(editPaste()) ); connect( editPasteAction, SIGNAL(triggered()), this, SLOT(editPaste()) );
@@ -200,24 +200,24 @@ namespace gLabels
connect( viewMarkupAction, SIGNAL(triggered()), this, SLOT(viewMarkup()) ); connect( viewMarkupAction, SIGNAL(triggered()), this, SLOT(viewMarkup()) );
viewZoomInAction = new QAction( tr("Zoom &In"), this ); viewZoomInAction = new QAction( tr("Zoom &In"), this );
viewZoomInAction->setIcon( QIcon::fromTheme( "zoom-in" ) ); viewZoomInAction->setIcon( QIcon::fromTheme( "zoom-in", Icons::Fallback::ZoomIn() ) );
viewZoomInAction->setShortcut( QKeySequence::ZoomIn ); viewZoomInAction->setShortcut( QKeySequence::ZoomIn );
viewZoomInAction->setStatusTip( tr("Increase magnification") ); viewZoomInAction->setStatusTip( tr("Increase magnification") );
connect( viewZoomInAction, SIGNAL(triggered()), this, SLOT(viewZoomIn()) ); connect( viewZoomInAction, SIGNAL(triggered()), this, SLOT(viewZoomIn()) );
viewZoomOutAction = new QAction( tr("Zoom &Out"), this ); viewZoomOutAction = new QAction( tr("Zoom &Out"), this );
viewZoomOutAction->setIcon( QIcon::fromTheme( "zoom-out" ) ); viewZoomOutAction->setIcon( QIcon::fromTheme( "zoom-out", Icons::Fallback::ZoomOut() ) );
viewZoomOutAction->setShortcut( QKeySequence::ZoomOut ); viewZoomOutAction->setShortcut( QKeySequence::ZoomOut );
viewZoomOutAction->setStatusTip( tr("Decrease magnification") ); viewZoomOutAction->setStatusTip( tr("Decrease magnification") );
connect( viewZoomOutAction, SIGNAL(triggered()), this, SLOT(viewZoomOut()) ); connect( viewZoomOutAction, SIGNAL(triggered()), this, SLOT(viewZoomOut()) );
viewZoom1to1Action = new QAction( tr("Zoom &1 to 1"), this ); viewZoom1to1Action = new QAction( tr("Zoom &1 to 1"), this );
viewZoom1to1Action->setIcon( QIcon::fromTheme( "zoom-original" ) ); viewZoom1to1Action->setIcon( QIcon::fromTheme( "zoom-original", Icons::Fallback::ZoomOriginal() ) );
viewZoom1to1Action->setStatusTip( tr("Restore scale to 100%") ); viewZoom1to1Action->setStatusTip( tr("Restore scale to 100%") );
connect( viewZoom1to1Action, SIGNAL(triggered()), this, SLOT(viewZoom1to1()) ); connect( viewZoom1to1Action, SIGNAL(triggered()), this, SLOT(viewZoom1to1()) );
viewZoomToFitAction = new QAction( tr("Zoom to &Fit"), this ); viewZoomToFitAction = new QAction( tr("Zoom to &Fit"), this );
viewZoomToFitAction->setIcon( QIcon::fromTheme( "zoom-fit-best" ) ); viewZoomToFitAction->setIcon( QIcon::fromTheme( "zoom-fit-best", Icons::Fallback::ZoomBestFit() ) );
viewZoomToFitAction->setStatusTip( tr("Set scale to fit window") ); viewZoomToFitAction->setStatusTip( tr("Set scale to fit window") );
connect( viewZoomToFitAction, SIGNAL(triggered()), this, SLOT(viewZoomToFit()) ); connect( viewZoomToFitAction, SIGNAL(triggered()), this, SLOT(viewZoomToFit()) );
+12
View File
@@ -42,6 +42,18 @@
<file>icons/24x24/actions/glabels-object-properties.png</file> <file>icons/24x24/actions/glabels-object-properties.png</file>
<file>icons/24x24/actions/glabels-pencil.png</file> <file>icons/24x24/actions/glabels-pencil.png</file>
<file>icons/24x24/actions/glabels-text.png</file> <file>icons/24x24/actions/glabels-text.png</file>
<file>icons/24x24/actions/fallback-edit-copy.png</file>
<file>icons/24x24/actions/fallback-edit-cut.png</file>
<file>icons/24x24/actions/fallback-edit-paste.png</file>
<file>icons/24x24/actions/fallback-file-new.png</file>
<file>icons/24x24/actions/fallback-file-open.png</file>
<file>icons/24x24/actions/fallback-file-print.png</file>
<file>icons/24x24/actions/fallback-file-save-as.png</file>
<file>icons/24x24/actions/fallback-file-save.png</file>
<file>icons/24x24/actions/fallback-zoom-best-fit.png</file>
<file>icons/24x24/actions/fallback-zoom-in.png</file>
<file>icons/24x24/actions/fallback-zoom-original.png</file>
<file>icons/24x24/actions/fallback-zoom-out.png</file>
<file>icons/24x24/apps/glabels.png</file> <file>icons/24x24/apps/glabels.png</file>
<file>icons/32x32/apps/glabels.png</file> <file>icons/32x32/apps/glabels.png</file>
<file>icons/48x48/apps/glabels.png</file> <file>icons/48x48/apps/glabels.png</file>
Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B