Permalink
Browse files

fixed window resize-triangle that broke due to the CSS3 improvements.…

… canvas force always showed the correct triangle. CSS3 window now using a css-style triangle. tested on ff3.6, s5 and winxp ie8
  • Loading branch information...
1 parent 799e97f commit 5ae5725b368a6c2090a60821ca05f15e4de0053d @ephaee ephaee committed with MochaUI Oct 22, 2010
Showing with 26 additions and 4 deletions.
  1. +2 −2 Demo/scripts/mocha-init.js
  2. +11 −0 Demo/themes/charcoal/css/Window.css
  3. +11 −0 Demo/themes/default/css/Window.css
  4. +2 −2 Source/Core/Window.js
@@ -453,7 +453,7 @@ var initializeWindows = function(){
addClass: 'no-canvas',
width: 305,
height: 175,
- resizable: false,
+ resizable: true,
useCanvas: false,
useCSS3: true
});
@@ -472,7 +472,7 @@ var initializeWindows = function(){
content: {url: 'pages/lipsum.html'},
width: 305,
height: 175,
- resizable: false,
+ resizable: true,
useCanvas: true,
useCSS3: true
});
@@ -124,6 +124,17 @@ div.mochaToolbarWrapper.bottom {
width: 20px;
height: 20px;
background: #646464; /* This is the color of the visible resize handle */
+}
+
+.mocha.css3 .cornerSE {
+ background: transparent;
+ border-color: transparent #646464 #646464 transparent;
+ border-style: solid;
+ border-width: 5px;
+ height: 0;
+ margin: 2px;
+ opacity: 1;
+ width: 0;
}
.mochaCanvasHeader {
@@ -135,6 +135,17 @@ div.mochaToolbarWrapper.bottom {
width: 20px;
height: 20px;
background: #fefefe; /* This is the color of the visible resize handle */
+}
+
+.mocha.css3 .cornerSE {
+ background: transparent;
+ border-color: transparent white white transparent;
+ border-style: solid;
+ border-width: 5px;
+ height: 0;
+ margin: 2px;
+ opacity: 1;
+ width: 0;
}
.mochaCanvasHeader {
@@ -555,7 +555,7 @@ MUI.Window = (MUI.Window || new NamedClass('MUI.Window', {})).implement({
var width = this.el.contentWrapper.getStyle('width').toInt() + shadowBlur2x;
var height = this.el.contentWrapper.getStyle('height').toInt() + this.headerFooterShadow + borderHeight;
if (this.sections) this.sections.each(function(section){
- if (section.position=='content') return;
+ if (section.position == 'content') return;
var el = section.wrap ? section.wrapperEl : section.element;
height += el.getStyle('height').toInt() + el.getStyle('border-top').toInt();
} );
@@ -1408,7 +1408,7 @@ MUI.Window = (MUI.Window || new NamedClass('MUI.Window', {})).implement({
this.el.windowEl.setStyle(pre + 'box-shadow', options.shadowOffset.x + 'px ' + options.shadowOffset.y + 'px ' + options.shadowBlur + 'px ' + color);
this.el.windowEl.setStyle(pre + 'border-radius', options.cornerRadius + 'px');
this.el.titleBar.setStyle(pre + 'border-radius', options.cornerRadius + 'px');
- },this);
+ }, this);
},
_attachDraggable: function(){

0 comments on commit 5ae5725

Please sign in to comment.