Update drag and drop look and instructions

This commit is contained in:
Micah Lee 2018-02-04 13:13:38 -08:00
parent 3e0010ca01
commit ae2140ceb8
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
5 changed files with 8 additions and 6 deletions

View file

@ -201,8 +201,8 @@ Section "install"
File "${BINPATH}\share\html\index.html" File "${BINPATH}\share\html\index.html"
SetOutPath "$INSTDIR\share\images" SetOutPath "$INSTDIR\share\images"
File "${BINPATH}\share\images\drop_files.png"
File "${BINPATH}\share\images\logo.png" File "${BINPATH}\share\images\logo.png"
File "${BINPATH}\share\images\logo_transparent.png"
File "${BINPATH}\share\images\logo_grayscale.png" File "${BINPATH}\share\images\logo_grayscale.png"
File "${BINPATH}\share\images\server_started.png" File "${BINPATH}\share\images\server_started.png"
File "${BINPATH}\share\images\server_stopped.png" File "${BINPATH}\share\images\server_stopped.png"
@ -379,8 +379,8 @@ FunctionEnd
Delete "$INSTDIR\share\html\404.html" Delete "$INSTDIR\share\html\404.html"
Delete "$INSTDIR\share\html\denied.html" Delete "$INSTDIR\share\html\denied.html"
Delete "$INSTDIR\share\html\index.html" Delete "$INSTDIR\share\html\index.html"
Delete "$INSTDIR\share\images\drop_files.png"
Delete "$INSTDIR\share\images\logo.png" Delete "$INSTDIR\share\images\logo.png"
Delete "$INSTDIR\share\images\logo_transparent.png"
Delete "$INSTDIR\share\images\logo_grayscale.png" Delete "$INSTDIR\share\images\logo_grayscale.png"
Delete "$INSTDIR\share\images\server_started.png" Delete "$INSTDIR\share\images\server_started.png"
Delete "$INSTDIR\share\images\server_stopped.png" Delete "$INSTDIR\share\images\server_stopped.png"

View file

@ -50,7 +50,7 @@ class FileList(QtWidgets.QListWidget):
self.setAlignment(QtCore.Qt.AlignCenter) self.setAlignment(QtCore.Qt.AlignCenter)
if image: if image:
self.setPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(common.get_resource_path('images/drop_files.png')))) self.setPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(common.get_resource_path('images/logo_transparent.png'))))
else: else:
self.setText(strings._('gui_drag_and_drop', True)) self.setText(strings._('gui_drag_and_drop', True))
self.setStyleSheet('color: #999999;') self.setStyleSheet('color: #999999;')
@ -64,6 +64,7 @@ class FileList(QtWidgets.QListWidget):
self.drop_here_image = DropHereLabel(self, True) self.drop_here_image = DropHereLabel(self, True)
self.drop_here_text = DropHereLabel(self, False) self.drop_here_text = DropHereLabel(self, False)
self.resizeEvent(None)
self.filenames = [] self.filenames = []
self.update() self.update()
@ -84,8 +85,9 @@ class FileList(QtWidgets.QListWidget):
""" """
When the widget is resized, resize the drop files image and text. When the widget is resized, resize the drop files image and text.
""" """
self.drop_here_image.setGeometry(0, 0, self.width(), self.height()) offset = 70
self.drop_here_text.setGeometry(0, 0, self.width(), self.height()) self.drop_here_image.setGeometry(0, 0, self.width(), self.height() - offset)
self.drop_here_text.setGeometry(0, offset, self.width(), self.height() - offset)
def dragEnterEvent(self, event): def dragEnterEvent(self, event):
""" """

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -34,7 +34,7 @@
"help_debug": "Log application errors to stdout, and log web errors to disk", "help_debug": "Log application errors to stdout, and log web errors to disk",
"help_filename": "List of files or folders to share", "help_filename": "List of files or folders to share",
"help_config": "Path to a custom JSON config file (optional)", "help_config": "Path to a custom JSON config file (optional)",
"gui_drag_and_drop": "Drag and drop\nfiles here", "gui_drag_and_drop": "Drag and drop files and folders\nto start sharing",
"gui_add": "Add", "gui_add": "Add",
"gui_delete": "Delete", "gui_delete": "Delete",
"gui_choose_items": "Choose", "gui_choose_items": "Choose",