[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/forms/src/uidrivers/win32 UIdriver.py widg...
From: |
Bajusz Tamás |
Subject: |
gnue/forms/src/uidrivers/win32 UIdriver.py widg... |
Date: |
Tue, 06 May 2003 17:29:03 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Bajusz Tamás <address@hidden> 03/05/06 17:29:03
Modified files:
forms/src/uidrivers/win32: UIdriver.py
forms/src/uidrivers/win32/widgets: button.py entry.py
forms/src/uidrivers/win32/widgets/form: widget.py
Log message:
fixing some "geometric" issues
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/UIdriver.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/widgets/button.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/widgets/entry.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/widgets/form/widget.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: gnue/forms/src/uidrivers/win32/UIdriver.py
diff -c gnue/forms/src/uidrivers/win32/UIdriver.py:1.12
gnue/forms/src/uidrivers/win32/UIdriver.py:1.13
*** gnue/forms/src/uidrivers/win32/UIdriver.py:1.12 Mon May 5 17:41:48 2003
--- gnue/forms/src/uidrivers/win32/UIdriver.py Tue May 6 17:29:02 2003
***************
*** 138,150 ****
dc = dummyWindow.GetWindowDC()
dc.SelectObject (font)
metrics = dc.GetTextMetrics()
! maxWidth = metrics["tmMaxCharWidth"]
maxHeight = metrics["tmHeight"]
maxDescent = metrics["tmDescent"]
maxLeading = metrics["tmExternalLeading"]
!
self.textWidth = int(maxWidth+maxLeading) # The pixel width of text
inside a widget
! self.textHeight = int(maxHeight+maxDescent) + 2 # The pixel height of
text inside a widget
self.widgetWidth = self.textWidth # The pixel width of a 1
char widget (for things like buttons)
self.widgetHeight = self.textHeight + 3 # The pixel height of a 1
char widget (for things like buttons)
--- 138,150 ----
dc = dummyWindow.GetWindowDC()
dc.SelectObject (font)
metrics = dc.GetTextMetrics()
! maxWidth = metrics["tmAveCharWidth"]
maxHeight = metrics["tmHeight"]
maxDescent = metrics["tmDescent"]
maxLeading = metrics["tmExternalLeading"]
!
self.textWidth = int(maxWidth+maxLeading) # The pixel width of text
inside a widget
! self.textHeight = int(maxHeight+maxDescent) # The pixel height of text
inside a widget
self.widgetWidth = self.textWidth # The pixel width of a 1
char widget (for things like buttons)
self.widgetHeight = self.textHeight + 3 # The pixel height of a 1
char widget (for things like buttons)
Index: gnue/forms/src/uidrivers/win32/widgets/button.py
diff -c gnue/forms/src/uidrivers/win32/widgets/button.py:1.4
gnue/forms/src/uidrivers/win32/widgets/button.py:1.5
*** gnue/forms/src/uidrivers/win32/widgets/button.py:1.4 Wed Apr 16
13:33:44 2003
--- gnue/forms/src/uidrivers/win32/widgets/button.py Tue May 6 17:29:03 2003
***************
*** 46,52 ****
newWidget = Win32Button(self._uiDriver, styleEx, 'BUTTON',
str(object.label), style,
object.Char__x*event.widgetWidth,
(object.Char__y+spacer+(spacer*object._gap))*event.widgetHeight,
! object.Char__width*event.widgetWidth,
object.Char__height*event.widgetHeight,
event.container, getNextId())
if event.initialize:
--- 46,52 ----
newWidget = Win32Button(self._uiDriver, styleEx, 'BUTTON',
str(object.label), style,
object.Char__x*event.widgetWidth,
(object.Char__y+spacer+(spacer*object._gap))*event.widgetHeight,
! object.Char__width*event.widgetWidth+8,
object.Char__height*event.widgetHeight,
event.container, getNextId())
if event.initialize:
Index: gnue/forms/src/uidrivers/win32/widgets/entry.py
diff -c gnue/forms/src/uidrivers/win32/widgets/entry.py:1.6
gnue/forms/src/uidrivers/win32/widgets/entry.py:1.7
*** gnue/forms/src/uidrivers/win32/widgets/entry.py:1.6 Sun May 4 18:15:07 2003
--- gnue/forms/src/uidrivers/win32/widgets/entry.py Tue May 6 17:29:03 2003
***************
*** 43,50 ****
object = event.object
ostyle = object.style
! height = self.itemHeight
! width = self.itemWidth
if ostyle == 'dropdown':
style = win32con.WS_CHILD | win32con.WS_VSCROLL | win32con.WS_BORDER |
win32con.LBS_NOTIFY | \
--- 43,50 ----
object = event.object
ostyle = object.style
! height = self.itemHeight+2
! width = self.itemWidth+8
if ostyle == 'dropdown':
style = win32con.WS_CHILD | win32con.WS_VSCROLL | win32con.WS_BORDER |
win32con.LBS_NOTIFY | \
Index: gnue/forms/src/uidrivers/win32/widgets/form/widget.py
diff -c gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.13
gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.14
*** gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.13 Sun Apr 27
17:04:30 2003
--- gnue/forms/src/uidrivers/win32/widgets/form/widget.py Tue May 6
17:29:03 2003
***************
*** 78,84 ****
style = win32con.WS_OVERLAPPEDWINDOW | win32con.WS_CLIPCHILDREN
styleEx = 0
self.mainWindow = Win32Window(self._uiDriver, styleEx,
self._uiDriver._wndclass, str(self._form.title),
! style, 0, 0,
max(formWidth*self._uiDriver.widgetWidth+10, buttonbarWidth)+6, # at
least buttonbar width
formHeight*self._uiDriver.widgetHeight+110+20, # TODO: calculate space
for buttonbar and statusbar and maybe for tabs
0)
--- 78,84 ----
style = win32con.WS_OVERLAPPEDWINDOW | win32con.WS_CLIPCHILDREN
styleEx = 0
self.mainWindow = Win32Window(self._uiDriver, styleEx,
self._uiDriver._wndclass, str(self._form.title),
! style, win32con.CW_USEDEFAULT, 0,
max(formWidth*self._uiDriver.widgetWidth+10, buttonbarWidth)+6, # at
least buttonbar width
formHeight*self._uiDriver.widgetHeight+110+20, # TODO: calculate space
for buttonbar and statusbar and maybe for tabs
0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/forms/src/uidrivers/win32 UIdriver.py widg...,
Bajusz Tamás <=