fixed vertical alignment of items
This commit is contained in:
parent
7535d1a543
commit
6eb4a4426d
1 changed files with 12 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: IconBar.cc,v 1.24 2003/02/23 00:51:40 fluxgen Exp $
|
// $Id: IconBar.cc,v 1.25 2003/02/23 14:29:08 fluxgen Exp $
|
||||||
|
|
||||||
#include "IconBar.hh"
|
#include "IconBar.hh"
|
||||||
#include "i18n.hh"
|
#include "i18n.hh"
|
||||||
|
@ -231,7 +231,8 @@ void IconBar::repositionIcons() {
|
||||||
|
|
||||||
//max width on every icon
|
//max width on every icon
|
||||||
unsigned int icon_width = width / m_iconlist.size();
|
unsigned int icon_width = width / m_iconlist.size();
|
||||||
|
if (m_vertical)
|
||||||
|
icon_width = height / m_iconlist.size();
|
||||||
//load right size of theme
|
//load right size of theme
|
||||||
loadTheme(icon_width, height);
|
loadTheme(icon_width, height);
|
||||||
|
|
||||||
|
@ -239,9 +240,15 @@ void IconBar::repositionIcons() {
|
||||||
IconList::iterator it_end = m_iconlist.end();
|
IconList::iterator it_end = m_iconlist.end();
|
||||||
for (x = 0; it != it_end; ++it, x += icon_width) {
|
for (x = 0; it != it_end; ++it, x += icon_width) {
|
||||||
Window iconwin = (*it)->getIconWin();
|
Window iconwin = (*it)->getIconWin();
|
||||||
|
if (!m_vertical) {
|
||||||
XMoveResizeWindow(m_display, iconwin,
|
XMoveResizeWindow(m_display, iconwin,
|
||||||
x, 0,
|
x, 0,
|
||||||
icon_width, height);
|
icon_width, height);
|
||||||
|
} else {
|
||||||
|
XMoveResizeWindow(m_display, iconwin,
|
||||||
|
0, x,
|
||||||
|
height, icon_width);
|
||||||
|
}
|
||||||
draw((*it), icon_width);
|
draw((*it), icon_width);
|
||||||
decorate(iconwin);
|
decorate(iconwin);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue