Changeset 134

Show
Ignore:
Timestamp:
04/06/04 19:33:01 (4 years ago)
Author:
ug
Message:

Fix button sizes in board toolbar

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 05/devel/v.py

    r130 r134  
    28512851                                 (self.next10Button, 'ffwd'), (self.prev10Button, 'fbwd'), 
    28522852                                 (self.startButton, 'start'), (self.endButton, 'end'), 
    2853                                  (self.passButton, 'pass'), (self.gameinfoButton, 'info'), 
    2854                                  (self.datawindowButton, 'data')]: 
     2853                                 (self.passButton, 'pass'), (self.gameinfoButton, 'info') ]: 
    28552854            try: 
    28562855                im = PhotoImage(file=os.path.join(self.basepath, 'gifs', filename + '.gif')) 
    2857                 button.config(image=im
     2856                button.config(image=im, width=22, height=22
    28582857                self.tkImages.append(im) 
    2859             except TclError
     2858            except
    28602859                pass 
    28612860 
     
    28742873        self.board.currentColor = 'black' 
    28752874 
     2875        if sys.platform[:3] == 'win': 
     2876            buttonsize = 20 
     2877        else: 
     2878            buttonsize = 24 
     2879 
    28762880        try: 
    28772881            self.bwI = PhotoImage(file=os.path.join(self.basepath, 'gifs/bw.gif')) 
     
    28802884            self.wI = PhotoImage(file=os.path.join(self.basepath, 'gifs/w.gif')) 
    28812885 
    2882  
    2883             self.BWbutton = Radiobutton(navFrame, image=self.bwI, indicatoron = 0, 
     2886            self.BWbutton = Radiobutton(navFrame, image=self.bwI, indicatoron = 0, width=buttonsize, height=buttonsize, 
    28842887                                        variable = self.modeVar, value='blackwhite', command=self.modeChange) 
    2885             self.WBbutton = Radiobutton(navFrame, image=self.wbI, indicatoron = 0, 
     2888            self.WBbutton = Radiobutton(navFrame, image=self.wbI, indicatoron = 0, width=buttonsize, height=buttonsize, 
    28862889                                        variable = self.modeVar, value='whiteblack', command=self.modeChange) 
    2887             self.Bbutton = Radiobutton(navFrame, image=self.bI, indicatoron = 0, 
     2890            self.Bbutton = Radiobutton(navFrame, image=self.bI, indicatoron = 0, width=buttonsize, height=buttonsize, 
    28882891                                       variable = self.modeVar, value='black', command=self.modeChange) 
    2889             self.Wbutton = Radiobutton(navFrame, image=self.wI, indicatoron = 0, 
     2892            self.Wbutton = Radiobutton(navFrame, image=self.wI, indicatoron = 0, width=buttonsize, height=buttonsize, 
    28902893                                       variable = self.modeVar, value='white', command=self.modeChange) 
     2894 
     2895            im = PhotoImage(file=os.path.join(self.basepath, 'gifs', 'data.gif')) 
     2896            self.datawindowButton.config(image=im, width=buttonsize, height=buttonsize) 
     2897            self.tkImages.append(im) 
    28912898             
    2892         except TclError
     2899        except
    28932900            self.BWbutton = Radiobutton(navFrame, text='BW', indicatoron = 0, 
    28942901                                        variable = self.modeVar, value='blackwhite', command=self.modeChange)