diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index a9484795b..c92960163 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -111,7 +111,7 @@ class MediaManagerItem(QtGui.QWidget): self.singleServiceItem = True self.pageLayout = QtGui.QVBoxLayout(self) self.pageLayout.setSpacing(0) - self.pageLayout.setContentsMargins(4, 0, 4, 0) + self.pageLayout.setMargin(0) self.requiredIcons() self.setupUi() self.retranslateUi() @@ -176,7 +176,7 @@ class MediaManagerItem(QtGui.QWidget): # break compatability), but it makes sense for the icon to # come before the tooltip (as you have to have an icon, but # not neccesarily a tooltip) - self.toolbar.addToolbarButton(title, icon, tooltip, slot, checkable) + return self.toolbar.addToolbarButton(title, icon, tooltip, slot, checkable) def addToolbarSeparator(self): """ @@ -268,7 +268,6 @@ class MediaManagerItem(QtGui.QWidget): #Add the List widget self.listView = self.ListViewWithDnD_class(self) self.listView.uniformItemSizes = True - self.listView.setGeometry(QtCore.QRect(10, 100, 256, 591)) self.listView.setSpacing(1) self.listView.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) diff --git a/openlp/core/lib/searchedit.py b/openlp/core/lib/searchedit.py index 738661e14..07279aea5 100644 --- a/openlp/core/lib/searchedit.py +++ b/openlp/core/lib/searchedit.py @@ -69,7 +69,7 @@ class SearchEdit(QtGui.QLineEdit): """ frameWidth = self.style().pixelMetric( QtGui.QStyle.PM_DefaultFrameWidth) - rightPadding = self.clearButton.sizeHint().width() + frameWidth + rightPadding = self.clearButton.width() + frameWidth if hasattr(self, u'menuButton'): leftPadding = self.menuButton.width() self.setStyleSheet( @@ -81,7 +81,7 @@ class SearchEdit(QtGui.QLineEdit): msz = self.minimumSizeHint(); self.setMinimumSize( max(msz.width(), - self.clearButton.sizeHint().width() + (frameWidth * 2) + 2), + self.clearButton.width() + (frameWidth * 2) + 2), max(msz.height(), self.clearButton.height() + (frameWidth * 2) + 2) ) @@ -93,13 +93,13 @@ class SearchEdit(QtGui.QLineEdit): ``event`` The event that happened. """ - sz = self.clearButton.sizeHint() + sz = self.clearButton.size() frameWidth = self.style().pixelMetric( QtGui.QStyle.PM_DefaultFrameWidth) self.clearButton.move(self.rect().right() - frameWidth - sz.width(), (self.rect().bottom() + 1 - sz.height()) / 2) if hasattr(self, u'menuButton'): - sz = self.menuButton.sizeHint() + sz = self.menuButton.size() self.menuButton.move(self.rect().left() + frameWidth + 2, (self.rect().bottom() + 1 - sz.height()) / 2) diff --git a/openlp/core/lib/toolbar.py b/openlp/core/lib/toolbar.py index e37dc6f22..93aed62e5 100644 --- a/openlp/core/lib/toolbar.py +++ b/openlp/core/lib/toolbar.py @@ -72,27 +72,27 @@ class OpenLPToolbar(QtGui.QToolBar): ``objectname`` The name of the object, as used in `