Had Area.SetSize() explicitly labelled as repainting the whole Area; made sure it does that on GTK+ (it already did on Windows and Mac). I think we're ready to declare the API as it stands now stable!

This commit is contained in:
Pietro Gagliardi 2014-06-09 22:47:45 -04:00
parent 764010bd81
commit a0e8048b06
3 changed files with 2 additions and 4 deletions

View File

@ -293,6 +293,7 @@ func NewArea(width int, height int, handler AreaHandler) *Area {
// SetSize sets the Area's internal drawing size.
// It has no effect on the actual control size.
// SetSize is safe for concurrent use; if the Area is being repainted or is handling an event, SetSize will wait for that to complete before changing the Area's size.
// SetSize will also signal the entirety of the Area to be redrawn as in RepaintAll.
// It panics if width or height is zero or negative.
func (a *Area) SetSize(width int, height int) {
a.lock.Lock()

View File

@ -363,6 +363,7 @@ func (s *sysData) setAreaSize(width int, height int) {
gtk_widget_set_size_request(c, width, height)
s.areawidth = width // for sysData.preferredSize()
s.areaheight = height
C.gtk_widget_queue_draw(c)
ret <- struct{}{}
}
<-ret

View File

@ -16,7 +16,3 @@ UNIX:
- several people suggested connecting to size-allocate of the GtkLayout, but then I can wind up in a situation where there's extra padding or border space in the direction I resized
- [12:55] <myklgo> pietro10: I meant to mention: 1073): Gtk-WARNING **: Theme parsing error: gtk.css:72:20: Not using units is deprecated. Assuming 'px'. twice.
- figure out why Page Up/Page Down does tab stops
ALL PLATFORMS:
- document that Area.SetAreaSize() will repaint the whole Area
- make sure this happens on both GTK+ and Mac OS X (it does happen on Windows already)