[PATCH] menu_widget.js

Jerritt Collord <[email protected]> Sun, 30 May 2004 09:15:40 -0700
Newsgroups gmane.comp.windows.devel.netwindows
Message-ID <[email protected]>
thanks,

Jerritt

_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org
menu_widget.patch (text/plain, 1.6 KB)
--- menu_widget-orig.js	Thu May 20 12:30:44 2004
+++ menu_widget.js	Thu May 20 13:24:40 2004
@@ -64,15 +64,15 @@
 
 	this.highlight = function(){
 		with(this.domNode.style){
-			if(this.isMenuVisible){
-				borderStyle = "inset";
-			}else{
-				borderStyle = "outset";
-			}
 			__util__.setClass(this.domNode, "Menu-button-highlight-div");
 			if(__config__.applyThemedStyles){
 				borderWidth = "1px 2px 1px 2px";
 				padding = "0px 4px 0px 4px";
+                        	if(this.isMenuVisible){
+                               	 	borderStyle = "inset";
+                        	}else{
+                               	 	borderStyle = "outset";
+                        	}
 			}
 		}
 	}
@@ -80,8 +80,10 @@
 	this.unHighlight = function(){
 		if(!this.isMenuVisible){
 			__util__.setClass(this.domNode, "Menu-button-div");
-			this.domNode.style.borderStyle = 'none none none none';
-			this.domNode.style.padding = "1px 6px 1px 6px";
+			if(__config__.applyThemedStyles){
+				this.domNode.style.borderStyle = 'none none none none';
+				this.domNode.style.padding = "1px 6px 1px 6px";
+			}
 		}
 	}
 }
@@ -260,7 +262,7 @@
 		dn.style.backgroundColor = __theme__.getAttr("menu_hl_bgcolor");
 		dn.style.color = __theme__.getAttr("menu_hl_font_color");
 	}else{
-		__util__.setClass(dNode, "Menu-item-highlight-div");
+		__util__.setClass(dn, "Menu-item-highlight-div");
 	}
 }
 
@@ -269,7 +271,7 @@
 		dn.style.backgroundColor = __theme__.getAttr("menu_bgcolor");
 		dn.style.color = __theme__.getAttr("menu_font_color");
 	}else{
-		__util__.setClass(dNode, "Menu-item-div");
+		__util__.setClass(dn, "Menu-item-div");
 	}
 }