450c24d4 pyros2097

13 years ago
v0.48
Files changed (10) hide show
  1. Widget/editor.py +0 -1
  2. Widget/editor.pyc +0 -0
  3. Widget/lexersquirrel.py +5 -1
  4. Widget/style.py +22 -22
  5. Widget/tab.py +2 -2
  6. Widget/tab.pyc +0 -0
  7. config.yaml +4 -2
  8. globals.py +12 -1
  9. main.py +2 -12
  10. window.py +11 -5
Widget/editor.py CHANGED
@@ -61,7 +61,6 @@ class Editor(QsciScintilla):
61
61
  self.api.prepare()
62
62
  self.lexer.setAPIs(self.api) #Very important do not change line otherwise gg
63
63
  self.setLexer(self.lexer) #Very important do not change line otherwise gg
64
- self.font.setPointSize(15)
65
64
 
66
65
 
67
66
  def setColorStyle(self,colorStyle):
Widget/editor.pyc CHANGED
Binary file
Widget/lexersquirrel.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from PyQt4.Qsci import QsciLexerCustom,QsciStyle
2
2
  from PyQt4.QtCore import QString
3
3
  from PyQt4.QtGui import QFont, QColor
4
+ from globals import fontName, fontSize
4
5
 
5
6
  class LexerSquirrel(QsciLexerCustom):
6
7
  words1 = [
@@ -37,7 +38,10 @@ class LexerSquirrel(QsciLexerCustom):
37
38
  self.parent = parent
38
39
  self.sci = self.parent
39
40
  self.colorStyle = colorStyle
41
+ self.plainFont = QFont()
42
+ self.plainFont.setFamily(fontName)
43
+ self.plainFont.setFixedPitch(True)
40
- self.plainFont = self.colorStyle.font
44
+ self.plainFont.setPointSize(fontSize)
41
45
  self.marginFont = QFont()
42
46
  self.marginFont.setPointSize(10)
43
47
  self.marginFont.setFamily("MS Dlg")
Widget/style.py CHANGED
@@ -6,55 +6,55 @@ class Style0:
6
6
  self.paper = QColor('#FFFFFF')
7
7
  self.caret = QColor('#ffe4e4')
8
8
  self.marker = QColor('#ee1111')
9
- self.margin = QColor('#cccccc')
9
+ self.margin = QColor('#ece9d8')
10
10
 
11
11
  class Style1:
12
12
  def __init__(self):
13
13
  self.color = QColor('#FFFFFF')
14
14
  self.paper = QColor('#000000')
15
- self.caret = QColor('#000000')
15
+ self.caret = QColor('#ffe4e4')
16
- self.marker = QColor('#000000')
16
+ self.marker = QColor('#ee1111')
17
- self.margin = QColor('#000000')
17
+ self.margin = QColor('#ece9d8')
18
18
 
19
19
  class Style2:
20
20
  def __init__(self):
21
21
  self.color = QColor('#eeeeee')
22
22
  self.paper = QColor('#aaaaaa')
23
- self.caret = QColor('#000000')
23
+ self.caret = QColor('#ffe4e4')
24
- self.marker = QColor('#000000')
24
+ self.marker = QColor('#ee1111')
25
- self.margin = QColor('#000000')
25
+ self.margin = QColor('#ece9d8')
26
26
 
27
27
  class Style3:
28
28
  def __init__(self):
29
29
  self.color = QColor('#FFFFFF')
30
30
  self.paper = QColor('#ff0000')
31
- self.caret = QColor('#000000')
31
+ self.caret = QColor('#ffe4e4')
32
- self.marker = QColor('#000000')
32
+ self.marker = QColor('#ee1111')
33
- self.margin = QColor('#000000')
33
+ self.margin = QColor('#ece9d8')
34
34
 
35
35
  class Style4:
36
36
  def __init__(self):
37
37
  self.color = QColor('#FFFFFF')
38
38
  self.paper = QColor('#00ff00')
39
- self.caret = QColor('#000000')
39
+ self.caret = QColor('#ffe4e4')
40
- self.marker = QColor('#000000')
40
+ self.marker = QColor('#ee1111')
41
- self.margin = QColor('#000000')
41
+ self.margin = QColor('#cccccc')
42
42
 
43
43
  class Style5:
44
44
  def __init__(self):
45
45
  self.color = QColor('#FFFFFF')
46
46
  self.paper = QColor('#0000ff')
47
- self.caret = QColor('#000000')
47
+ self.caret = QColor('#ffe4e4')
48
- self.marker = QColor('#000000')
48
+ self.marker = QColor('#ee1111')
49
- self.margin = QColor('#000000')
49
+ self.margin = QColor('#ece9d8')
50
50
 
51
51
  class Style6:
52
52
  def __init__(self):
53
53
  self.color = QColor('#FFFFFF')
54
54
  self.paper = QColor('#0f0f0f')
55
- self.caret = QColor('#000000')
55
+ self.caret = QColor('#ffe4e4')
56
- self.marker = QColor('#000000')
56
+ self.marker = QColor('#ee1111')
57
- self.margin = QColor('#000000')
57
+ self.margin = QColor('#cccccc')
58
58
 
59
59
  class Style7:
60
60
  def __init__(self):
@@ -68,6 +68,6 @@ class Style8:
68
68
  def __init__(self):
69
69
  self.color = QColor('#eeFeFe')
70
70
  self.paper = QColor('#0f0f00')
71
- self.caret = QColor('#000000')
71
+ self.caret = QColor('#ffe4e4')
72
- self.marker = QColor('#000000')
72
+ self.marker = QColor('#ee1111')
73
- self.margin = QColor('#000000')
73
+ self.margin = QColor('#cccccc')
Widget/tab.py CHANGED
@@ -14,7 +14,7 @@ class MyTabBar(QTabBar):
14
14
  def __init__(self,parent):
15
15
  QTabBar.__init__(self,parent)
16
16
  self.setAcceptDrops(True)
17
-
17
+
18
18
  def dragEnterEvent(self, event):
19
19
  if event.mimeData().hasUrls:
20
20
  event.accept()
@@ -45,7 +45,7 @@ class Tab(QTabWidget):
45
45
  self.setTabBar(MyTabBar(self))
46
46
  self.setAcceptDrops(True)
47
47
  self.connect(self.tabBar(), SIGNAL("dropped"), self.addItem)
48
-
48
+
49
49
  def dragEnterEvent(self, event):
50
50
  if event.mimeData().hasUrls:
51
51
  event.accept()
Widget/tab.pyc CHANGED
Binary file
config.yaml CHANGED
@@ -6,7 +6,9 @@ ADB:
6
6
  shell kill
7
7
  File:
8
8
  - C:/CODE/assets/creditscene.nut
9
- - C:/CODE/assets/main.nut
9
+ - C:/CODE/assets/common.nut
10
+ - C:/CODE/assets/runtime.nut
11
+ - C:/CODE/assets/Engine.h
10
12
  Project:
11
13
  - C:/CODE/data/
12
14
  - C:/CODE/assets/
@@ -16,7 +18,7 @@ Setting:
16
18
  fontname: Courier New
17
19
  fontsize: 10
18
20
  iconsize: 16
19
- styleindex: 0
21
+ styleindex: 5
20
22
  thresh: 1
21
23
  workspace: C:/CODE/
22
24
  Style: 0
globals.py CHANGED
@@ -1,3 +1,13 @@
1
+ #!/usr/bin/env python
2
+ __author__ = "pyros2097"
3
+ __license__ = "GPLv3"
4
+ __version__ = "0.48"
5
+ __copyright__ = 'Copyright (c) 2012, pyros2097'
6
+ __credits__ = ['pyros2097', 'eclipse']
7
+ __email__ = 'pyros2097@gmail.com'
8
+ __version__ = "0.48"
9
+
10
+
1
11
  import os
2
12
  from platform import system,python_version
3
13
  from PyQt4.QtGui import QIcon,QPixmap
@@ -5,6 +15,8 @@ from PyQt4.Qsci import QsciAPIs
5
15
  from send2trash import send2trash
6
16
  from config import Config
7
17
 
18
+
19
+
8
20
  #Python accesses local variables much more efficiently than global variables.
9
21
  oslistdir = os.listdir
10
22
  ospathisdir = os.path.isdir
@@ -35,7 +47,6 @@ fontSize = config.fontSize()
35
47
  fontName = config.fontName()
36
48
  iconSize = config.iconSize()
37
49
  styleIndex = config.styleIndex()
38
- colorStyle = config.colorStyle
39
50
  adblist = config.adb()
40
51
 
41
52
  def os_icon(name):
main.py CHANGED
@@ -1,11 +1,3 @@
1
- #!/usr/bin/env python
2
- __author__ = "pyros2097"
3
- __license__ = "GPLv3"
4
- __version__ = "0.48"
5
- __copyright__ = 'Copyright (c) 2012, pyros2097'
6
- __credits__ = ['pyros2097', 'eclipse']
7
- __email__ = 'pyros2097@gmail.com'
8
-
9
1
  #TODO:
10
2
  #Add options for all GUI
11
3
  #Add Project Options
@@ -18,7 +10,7 @@ import icons_rc
18
10
  from window import Window
19
11
  from Widget import Editor,PyInterp,Adb
20
12
  from globals import (ospathsep,ospathjoin,ospathbasename,workDir,
21
- OS_NAME,PY_VERSION,os_icon,config,workSpace,
13
+ OS_NAME,os_icon,config,workSpace,
22
14
  iconSize,iconDir,ospathexists,os_pixmap)
23
15
 
24
16
 
@@ -263,7 +255,7 @@ class MainWindow(Window):
263
255
  elif (nfile.endswith(".cpp") or nfile.endswith(".h") or nfile.endswith(".c")):
264
256
  lang = 1
265
257
  elif nfile.endswith(".nut"):
266
- lang = 0
258
+ lang = 2
267
259
  return lang
268
260
 
269
261
  def options(self):
@@ -282,5 +274,3 @@ if __name__ == "__main__":
282
274
  frame.showMaximized()
283
275
  splash.finish(frame)
284
276
  app.exec_()
285
-
286
-
window.py CHANGED
@@ -2,16 +2,16 @@ from PyQt4.QtGui import (QAction,QIcon,QMessageBox,QWidgetAction,QMenu,QWidget,
2
2
  QHBoxLayout,QVBoxLayout,QTabWidget,QToolBar,QTextEdit,
3
3
  QLineEdit,QPushButton,QToolButton,QSplitter,QStatusBar,
4
4
  QMainWindow,QPalette,QColor)
5
- from PyQt4.QtCore import QSize,Qt, QT_VERSION_STR,PYQT_VERSION_STR
5
+ from PyQt4.QtCore import QSize,Qt, QT_VERSION_STR,PYQT_VERSION_STR,QStringList
6
6
  from Widget import Tab,Tree
7
7
  from Widget.style import *
8
8
 
9
9
  from globals import (ospathsep,ospathjoin,ospathbasename,workDir,
10
- OS_NAME,PY_VERSION,os_icon,config,workSpace,
10
+ OS_NAME,PY_VERSION,__version__,os_icon,config,workSpace,
11
11
  iconSize,iconDir,styleIndex)
12
12
 
13
13
 
14
- __version__ = "0.48"
14
+
15
15
 
16
16
  class Window(QMainWindow):
17
17
  def __init__(self,parent = None):
@@ -24,6 +24,7 @@ class Window(QMainWindow):
24
24
  self.centralwidget.setObjectName("centralwidget")
25
25
  self.horizontalLayout = QHBoxLayout(self.centralwidget)
26
26
  self.horizontalLayout.setObjectName("horizontalLayout")
27
+ self.horizontalLayout.setMargin(0)
27
28
  self.styleIndex = styleIndex
28
29
  #TabWidgets
29
30
  self.tab_1 = QWidget(self)
@@ -154,9 +155,10 @@ class Window(QMainWindow):
154
155
 
155
156
  #Splitters
156
157
  self.split1 = QSplitter(Qt.Horizontal)
158
+ self.split1.addWidget(self.tabWidget_2)
157
159
  self.split1.addWidget(self.tab_1)
158
160
  #self.split1.addWidget(self.tab_5)
159
- self.split1.addWidget(self.tabWidget_2)
161
+
160
162
  self.split2 = QSplitter(Qt.Vertical)
161
163
  self.split2.addWidget(self.split1)
162
164
  self.split2.addWidget(self.tabWidget_3)
@@ -192,6 +194,7 @@ class Window(QMainWindow):
192
194
  #Init
193
195
  self.setCentralWidget(self.centralwidget)
194
196
  self.setStatusBar(self.statusbar)
197
+ self
195
198
  #QtGui.QApplication.setStyle(QtGui.QStyleFactory.create('Cleanlooks'))
196
199
 
197
200
  def findBarShow(self):
@@ -203,11 +206,13 @@ class Window(QMainWindow):
203
206
  def initColorStyle(self):
204
207
  self.colorStyle = self.checkColorStyle(self.styleIndex)
205
208
  pal = QPalette(self.tabWidget_2.palette())
209
+ #print pal.color(QPalette.Base).name()
210
+ #print pal.color(QPalette.Window).name()
206
211
  pal.setColor(QPalette.Base,self.colorStyle.paper)
207
212
  pal.setColor(QPalette.Text,self.colorStyle.color)
208
213
  self.tabWidget_2.setPalette(pal)
209
214
  self.tabWidget_3.setPalette(pal)
210
-
215
+
211
216
  def initToolBar(self):
212
217
  self.action_NewProject = QAction(os_icon('newprj_wiz'), 'Project', self)
213
218
  self.action_NewProject.setShortcut('Ctrl+P')
@@ -312,6 +317,7 @@ class Window(QMainWindow):
312
317
  self.toolbar.setIconSize(QSize(16,16))
313
318
  self.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
314
319
  self.toolbar.setAllowedAreas(Qt.AllToolBarAreas)
320
+ #self.toolbar.setFixedHeight(40)
315
321
 
316
322
  self.toolbar.addAction(self.action_NewProject)
317
323
  self.toolbar.addAction(self.action_Open)