X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fui%2Flistitemcontextbuttonbar.cpp;h=45fc2e0d599b9c9b5093818d7c1e431420f427b6;hb=21df569524ed477be98e9b45784519d8090fb4b3;hp=d7b6551305d98e9b52cbe259737e85336eb8747f;hpb=1f7e3499542a5f61188985e01a31feaf250a045e;p=situare diff --git a/src/ui/listitemcontextbuttonbar.cpp b/src/ui/listitemcontextbuttonbar.cpp index d7b6551..45fc2e0 100644 --- a/src/ui/listitemcontextbuttonbar.cpp +++ b/src/ui/listitemcontextbuttonbar.cpp @@ -42,6 +42,11 @@ ListItemContextButtonBar::ListItemContextButtonBar(QWidget *parent) : const int BAR_HEIGHT = 78; setFixedHeight(BAR_HEIGHT); + const int BUTTON_WIDTH = 74; + const int BUTTON_COUNT = 3; + const int HORIZONTAL_MARGIN = 10; + setFixedWidth(BUTTON_COUNT * BUTTON_WIDTH + 2 * HORIZONTAL_MARGIN); + m_backgroundLeft = new QPixmap(":/res/images/list_item_context_button_bar_left.png"); m_backgroundMiddle = new QPixmap(":/res/images/list_item_context_button_bar_tile.png"); m_backgroundRight = new QPixmap(":/res/images/list_item_context_button_bar_right.png"); @@ -87,11 +92,11 @@ void ListItemContextButtonBar::changeButtons() m_newContextButtons = 0; m_contextButtons->setParent(this); m_contextButtons->show(); - setFixedWidth(m_contextButtons->width()); +// setFixedWidth(m_contextButtons->width()); // center this widget horizontally to middle of the panel contents area and set outside of // the view - const int FROM_PANEL_CONTENTS_LEFT = PANEL_WIDTH / 2 - m_contextButtons->width() / 2; + const int FROM_PANEL_CONTENTS_LEFT = PANEL_WIDTH / 2 - width() / 2; move(PANEL_TAB_BAR_WIDTH + PANEL_BAR_WIDTH + FROM_PANEL_CONTENTS_LEFT, -size().height()); // update new target values for animations