Skip to content
Permalink
Browse files

Use ellipsis for isolated strings in plugins too

  • Loading branch information
nyalldawson committed Aug 9, 2017
1 parent dc58c1a commit e0fbe3409a1e5acf85b5217d6a02243c5c6122b9
@@ -158,7 +158,7 @@ def doCheck(self, method, parameters, context, feedback):

reason = "\n".join(reasons)
if len(reason) > 255:
reason = reason[:252] + '...'
reason = reason[:252] + ''
attrs.append(reason)

outFeat = QgsFeature()
@@ -72,7 +72,7 @@ def __init__(self, param, row, col, dialog):
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
self.pushButton = QPushButton()
self.pushButton.setText('...')
self.pushButton.setText('')
self.pushButton.clicked.connect(self.showPopupMenu)
self.horizontalLayout.addWidget(self.pushButton)
self.setLayout(self.horizontalLayout)
@@ -64,7 +64,7 @@ def __init__(self, output, alg, row, col, panel):
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
self.pushButton = QPushButton()
self.pushButton.setText('...')
self.pushButton.setText('')
self.pushButton.clicked.connect(self.showSelectionDialog)
self.horizontalLayout.addWidget(self.pushButton)
self.setLayout(self.horizontalLayout)
@@ -405,7 +405,7 @@ def __init__(self, parent=None, selectFile=False):

# create gui
self.btnSelect = QToolButton()
self.btnSelect.setText(self.tr('...'))
self.btnSelect.setText('…')
self.lineEdit = QLineEdit()
self.hbl = QHBoxLayout()
self.hbl.setMargin(0)
@@ -452,7 +452,7 @@ def __init__(self, parent=None):

# create gui
self.btnSelect = QToolButton()
self.btnSelect.setText(self.tr('...'))
self.btnSelect.setText('…')
self.lineEdit = QLineEdit()
self.hbl = QHBoxLayout()
self.hbl.setMargin(0)
@@ -230,7 +230,7 @@ class ExpressionWidgetWrapperMixin():
def wrapWithExpressionButton(self, basewidget):
expr_button = QToolButton()
expr_button.clicked.connect(self.showExpressionsBuilder)
expr_button.setText('...')
expr_button.setText('')

layout = QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
@@ -640,7 +640,7 @@ def createWidget(self):
self.combo = QgsMapLayerComboBox()
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -680,7 +680,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -755,6 +755,7 @@ def value(self):


class LayerWidgetWrapper(WidgetWrapper):

def __init__(self):
raise NotImplementedError('Layer widget wrapper is not implemented yet')

@@ -774,7 +775,7 @@ def createWidget(self):
layout.addWidget(self.combo)
layout.setAlignment(self.combo, Qt.AlignTop)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -843,7 +844,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -1063,7 +1064,7 @@ def createWidget(self):
self.combo = QgsMapLayerComboBox()
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -1113,7 +1114,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
@@ -260,10 +260,10 @@ def getAdjustedText(self, text):
if w < self.BOX_WIDTH - 25 - FlatButtonGraphicItem.WIDTH:
return text

text = text[0:-3] + '...'
text = text[0:-3] + ''
w = fm.width(text)
while w > self.BOX_WIDTH - 25 - FlatButtonGraphicItem.WIDTH:
text = text[0:-4] + '...'
text = text[0:-4] + ''
w = fm.width(text)
return text

0 comments on commit e0fbe34

Please sign in to comment.
You can’t perform that action at this time.