Commit 491dea20 authored by Dan Pascu's avatar Dan Pascu

Do not display the menu indicator arrow on the dial buttons

parent 4a520cc7
# Copyright (c) 2010 AG Projects. See LICENSE for details.
#
__all__ = ['ToolButton']
from PyQt4.QtGui import QStyle, QStyleOptionToolButton, QStylePainter, QToolButton
class ToolButton(QToolButton):
"""A custom QToolButton that doesn't show a menu indicator arrow"""
def paintEvent(self, event):
painter = QStylePainter(self)
option = QStyleOptionToolButton()
self.initStyleOption(option)
option.features &= ~QStyleOptionToolButton.HasMenu
painter.drawComplexControl(QStyle.CC_ToolButton, option)
......@@ -553,7 +553,7 @@ buttons below.</string>
</widget>
</item>
<item>
<widget class="QToolButton" name="im_session_button">
<widget class="ToolButton" name="im_session_button">
<property name="minimumSize">
<size>
<width>29</width>
......@@ -581,7 +581,7 @@ buttons below.</string>
</widget>
</item>
<item>
<widget class="QToolButton" name="ds_session_button">
<widget class="ToolButton" name="ds_session_button">
<property name="minimumSize">
<size>
<width>29</width>
......@@ -836,6 +836,11 @@ buttons below.</string>
<extends>QComboBox</extends>
<header>blink.accounts</header>
</customwidget>
<customwidget>
<class>ToolButton</class>
<extends>QToolButton</extends>
<header>blink.widgets.buttons</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>search_box</tabstop>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment