Bladeren bron

set app icon for windows

Signed-off-by: Le Tan <[email protected]>
Le Tan 9 jaren geleden
bovenliggende
commit
201d14116f
5 gewijzigde bestanden met toevoegingen van 13 en 0 verwijderingen
  1. BIN
      src/resources/icons/vnote.ico
  2. 9 0
      src/resources/icons/vnote.svg
  3. 1 0
      src/src.pro
  4. 1 0
      src/vmainwindow.cpp
  5. 2 0
      src/vnote.qrc

BIN
src/resources/icons/vnote.ico


+ 9 - 0
src/resources/icons/vnote.svg

@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
+ <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
+ <g>
+  <title>Layer 1</title>
+  <rect stroke-opacity="0" id="svg_1" height="512" width="512" y="0" x="0" stroke-width="5" stroke="#000000" fill="#007f00"/>
+  <text stroke="#000000" transform="matrix(43.26813891090647,0,0,13.274300463995566,-6171.349170333156,-1955.6540426635258) " font-weight="bold" xml:space="preserve" text-anchor="middle" font-family="Sans-serif" font-size="24" id="svg_2" y="179.303718" x="148.329363" stroke-opacity="0" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" fill="#ffffff">V</text>
+ </g>
+</svg>

+ 1 - 0
src/src.pro

@@ -11,6 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 TARGET = VNote
 TEMPLATE = app
 
+RC_ICONS = resources/icons/vnote.ico
 
 SOURCES += main.cpp\
         vmainwindow.cpp \

+ 1 - 0
src/vmainwindow.cpp

@@ -16,6 +16,7 @@ extern VConfigManager vconfig;
 VMainWindow::VMainWindow(QWidget *parent)
     : QMainWindow(parent), notebookComboMuted(false)
 {
+    setWindowIcon(QIcon(":/resources/icons/vnote.ico"));
     // Must be called before those who uses VConfigManager
     vnote = new VNote();
     initPredefinedColorPixmaps();

+ 2 - 0
src/vnote.qrc

@@ -59,5 +59,7 @@
         <file>resources/icons/corner_tablist.svg</file>
         <file>resources/icons/outline.svg</file>
         <file>resources/icons/create_rootdir_tb.svg</file>
+        <file>resources/icons/vnote.svg</file>
+        <file>resources/icons/vnote.ico</file>
     </qresource>
 </RCC>