Skip to content

Commit

Permalink
Merge pull request #373 from freedomofpress/refresh-polish
Browse files Browse the repository at this point in the history
polish refresh
  • Loading branch information
redshiftzero authored May 20, 2019
2 parents 684b5c7 + 205531c commit b8baa47
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion securedrop_client/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def show_sync(self, updated_on):
Display a message indicating the data-sync state.
"""
if updated_on:
self.update_activity_status(_('Last refresh: {}').format(updated_on.humanize()))
self.update_activity_status(_('Last Refresh: {}').format(updated_on.humanize()))
else:
self.update_activity_status(_('Waiting to refresh...'), 5000)

Expand Down
6 changes: 3 additions & 3 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self):
self.setLayout(layout)

# Remove margins and spacing
layout.setContentsMargins(0, 0, 0, 0)
layout.setContentsMargins(10, 0, 0, 0)
layout.setSpacing(0)

# Refresh button
Expand Down Expand Up @@ -189,14 +189,14 @@ def __init__(self):
disabled='refresh_offline.svg',
active='refresh_active.svg',
selected='refresh.svg',
svg_size=QSize(22, 22))
svg_size=QSize(18, 18))

# Set css id
self.setObjectName('refresh_button')

# Set styles
self.setStyleSheet(self.CSS)
self.setFixedSize(QSize(42, 42))
self.setFixedSize(QSize(22, 22))

# Click event handler
self.clicked.connect(self._on_clicked)
Expand Down
18 changes: 1 addition & 17 deletions securedrop_client/resources/images/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/gui/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_show_sync(mocker):
updated_on = mocker.MagicMock()
w.show_sync(updated_on)
w.update_activity_status.assert_called_once_with(
'Last refresh: {}'.format(updated_on.humanize()))
'Last Refresh: {}'.format(updated_on.humanize()))


def test_show_sync_no_sync(mocker):
Expand Down

0 comments on commit b8baa47

Please sign in to comment.