Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed use of DialogWindow css for IE in kitchensink

  • Loading branch information...
commit 35e802c3de7d22e040ed2ad9b5dedbf8f8178efa 1 parent 03ff00d
@keesbos keesbos authored
View
3  examples/kitchensink/public/KitchenSink.css
@@ -65,6 +65,7 @@ a:visited {
border: 0;
background: transparent url(images/window_minimize.gif) no-repeat center top;
text-indent: -1000em;
+ display: block;
}
.gwt-DialogBox .Maximize {
@@ -75,6 +76,7 @@ a:visited {
border: 0;
background: transparent url(images/window_maximize.gif) no-repeat center top;
text-indent: -1000em;
+ display: block;
}
.gwt-DialogBox .Close {
@@ -85,6 +87,7 @@ a:visited {
border: 0;
background: transparent url(images/window_close.gif) no-repeat center top;
text-indent: -1000em;
+ display: block;
}
.gwt-PopupPanelGlass {
View
15 library/pyjamas/ui/DialogWindow.py
@@ -67,21 +67,30 @@ def __init__(self, autoHide=None, modal=True, centered=False,
self.caption.setStyleName(captionStyle)
self.setControls(minimize, maximize, close)
+ def createDefaultControl(self, control_type):
+ if control_type == 'minimize':
+ return Button("_")
+ elif control_type == 'maximize':
+ return Button("^")
+ elif control_type == 'close':
+ return Button("X")
+ raise ValueError("Invalid control '%s'" % control_type)
+
def setControls(self, minimize, maximize, close):
if minimize is True:
- self.minimizeWidget = Button("_")
+ self.minimizeWidget = self.createDefaultControl('minimize')
elif isinstance(minimize, basestring):
self.minimizeWidget = Image(minimize)
else:
self.minimizeWidget = minimize
if maximize is True:
- self.maximizeWidget = Button("^")
+ self.maximizeWidget = self.createDefaultControl('maximize')
elif isinstance(maximize, basestring):
self.maximizeWidget = Image(maximize)
else:
self.maximizeWidget = maximize
if close is True:
- self.closeWidget = Button("X")
+ self.closeWidget = self.createDefaultControl('close')
elif isinstance(close, basestring):
self.closeWidget = Image(close)
else:
Please sign in to comment.
Something went wrong with that request. Please try again.