Преглед на файлове

Fix annoying padding between system icons (especially apparent at 16x16).

git-svn-id: file:///var/svn/tigccpp/trunk@702 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler преди 18 години
родител
ревизия
f6eadf1b43
променени са 2 файла, в които са добавени 8 реда и са изтрити 6 реда
  1. 8 0
      ktigcc/ktigcc.cpp
  2. 0 6
      ktigcc/srcfilewin.ui.h

+ 8 - 0
ktigcc/ktigcc.cpp

@@ -29,6 +29,10 @@
 #include <kcmdlineargs.h>
 #include <kaboutdata.h>
 #include <qtextcodec.h>
+#include <qiconset.h>
+#include <qsize.h> 
+#include <kicontheme.h>
+#include <kiconloader.h>
 #include <kconfig.h>
 #include "mainform.h"
 using namespace std;
@@ -76,6 +80,10 @@ int main( int argc, char *argv[] )
   KCmdLineArgs::addCmdLineOptions(options);
   KApplication::addCmdLineOptions();
   KApplication app;
+  // Set the preferred large icon size so system toolbar icons don't get
+  // annoying padding.
+  int toolbarIconSize=KIconLoader().currentSize(KIcon::MainToolbar);
+  QIconSet::setIconSize(QIconSet::Large,QSize(toolbarIconSize,toolbarIconSize));
   // Readd the images KDE kindly removes...
   qCleanupImages_ktigcc();
   qInitImages_ktigcc();

+ 0 - 6
ktigcc/srcfilewin.ui.h

@@ -248,8 +248,6 @@ void SourceFileWindow::initBase()
     findFunctionsAction->setIconSet(LOAD_ICON("view_tree"));
     editIncreaseIndentAction->setIconSet(LOAD_ICON("indent"));
     editDecreaseIndentAction->setIconSet(LOAD_ICON("unindent"));
-    // stop compilation: "stop"
-    // force-quit compiler: "button_cancel"
   }
   QToolButton *findFunctionsButton=static_cast<QToolButton *>(toolBar
     ->child("findFunctionsAction_action_button","QToolButton",FALSE));
@@ -568,8 +566,6 @@ void SourceFileWindow::applyPreferences()
     findFunctionsAction->setIconSet(LOAD_ICON("view_tree"));
     editIncreaseIndentAction->setIconSet(LOAD_ICON("indent"));
     editDecreaseIndentAction->setIconSet(LOAD_ICON("unindent"));
-    // stop compilation: "stop"
-    // force-quit compiler: "button_cancel"
   } else {
     fileSaveAction->setIconSet(QIconSet(QPixmap::fromMimeSource("02")));
     fileAddToProjectAction->setIconSet(QIconSet(QPixmap::fromMimeSource("08")));
@@ -587,8 +583,6 @@ void SourceFileWindow::applyPreferences()
     findFunctionsAction->setIconSet(QIconSet(QPixmap::fromMimeSource("18")));
     editIncreaseIndentAction->setIconSet(QIconSet(QPixmap::fromMimeSource("19")));
     editDecreaseIndentAction->setIconSet(QIconSet(QPixmap::fromMimeSource("20")));
-    // stop compilation: "21"
-    // force-quit compiler: "22"
   }
 }