File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -1706,14 +1706,28 @@ LRESULT CALLBACK PhThemeWindowDrawToolbar(
1706
1706
0
1707
1707
))
1708
1708
{
1709
- DrawInfo -> nmcd .rc .left += 5 ;
1709
+ LONG x ;
1710
+ LONG y ;
1711
+
1712
+ if (buttonInfo .fsStyle & BTNS_SHOWTEXT )
1713
+ {
1714
+ DrawInfo -> nmcd .rc .left += 5 ;
1715
+
1716
+ x = DrawInfo -> nmcd .rc .left ;// + ((DrawInfo->nmcd.rc.right - DrawInfo->nmcd.rc.left) - PhSmallIconSize.X) / 2;
1717
+ y = DrawInfo -> nmcd .rc .top + ((DrawInfo -> nmcd .rc .bottom - DrawInfo -> nmcd .rc .top ) - PhSmallIconSize .Y ) / 2 ;
1718
+ }
1719
+ else
1720
+ {
1721
+ x = DrawInfo -> nmcd .rc .left + ((DrawInfo -> nmcd .rc .right - DrawInfo -> nmcd .rc .left ) - PhSmallIconSize .X ) / 2 ;
1722
+ y = DrawInfo -> nmcd .rc .top + ((DrawInfo -> nmcd .rc .bottom - DrawInfo -> nmcd .rc .top ) - PhSmallIconSize .Y ) / 2 ;
1723
+ }
1710
1724
1711
1725
PhImageListDrawIcon (
1712
1726
toolbarImageList ,
1713
1727
buttonInfo .iImage ,
1714
1728
DrawInfo -> nmcd .hdc ,
1715
- DrawInfo -> nmcd . rc . left ,
1716
- DrawInfo -> nmcd . rc . top + 3 ,
1729
+ x ,
1730
+ y ,
1717
1731
ILD_NORMAL
1718
1732
);
1719
1733
}
You can’t perform that action at this time.
0 commit comments