Skip to content

Commit f750c7c

Browse files
committed
Visual Studio menu sample update
1 parent 832b630 commit f750c7c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

samples/menu/menu-vs.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ul#menu-bar:not(:focus) > li:hover /* current menu item in menu bar */
4040
border-color:color(menu-item-hover-border);
4141
}
4242

43-
ul#menu-bar > li:current /* current menu item in menu bar in focus - showing popup menu */
43+
ul#menu-bar > li:current:owns-popup /* current menu item in menu bar in focus - showing popup menu */
4444
{
4545
background-color:color(menu-popup-back);
4646
border-color:color(menu-popup-border);
@@ -127,14 +127,17 @@ menu li:has-child-of-type(menu)
127127
{
128128
foreground-image:url(stock:arrow-right); /* that arrow */
129129
foreground-repeat: no-repeat;
130-
foreground-position: 100% 50%;
130+
foreground-position-top: 50%;
131+
foreground-position-left: auto;
132+
foreground-position-right: 4dip;
131133
}
132134

133135
menu li:has-child-of-type(menu):rtl
134136
{
135137
foreground-image:url(stock:arrow-left); /* that arrow */
136138
foreground-repeat: no-repeat;
137-
foreground-position: 0% 50%;
139+
foreground-position-right: auto;
140+
foreground-position-left: 4dip;
138141
}
139142

140143

samples/menu/menu-vs.tis

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ class RootPopupMenu : Element {
55
var pw = li.box(#width,#padding);
66
var pix = self.toPixels(1dip);
77
var (x,y,w,h) = this.box(#rectw,#border);
8-
gfx.fillColor(li.style#border-top-color)
8+
var borderColor = this.style.variable("menu-popup-border");
9+
gfx.fillColor(borderColor)
910
.strokeWidth(0)
1011
.rectangle(pw-pix,y,w-pw,pix)
1112
.rectangle(x+w-pix,y,pix,h)
1213
.rectangle(x-pix,y+h-pix,w,pix)
1314
.rectangle(x,y-pix,pix,h)
14-
//.translate(pix/2.0,pix/2.0)
15-
//.polyline(pw,y1,x2,y1,x2,y2,x1,y2,x1,y1);
1615
}
1716

1817
}

0 commit comments

Comments
 (0)