Skip to content

Commit

Permalink
Make design of internallinkwidget consistent with server
Browse files Browse the repository at this point in the history
  • Loading branch information
claucambra committed Jan 17, 2022
1 parent 1a786ef commit 58c0fa1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 23 deletions.
4 changes: 3 additions & 1 deletion src/gui/internallinkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ void InternalLinkWidget::slotLinkFetched(const QString &url)
_ui->copyInternalLinkButton->setEnabled(true);
_ui->internalLinkProgressIndicator->setVisible(false);
_ui->internalLinkProgressIndicator->stopAnimation();
_ui->horizontalSpacer->changeSize(0, 0);
_ui->horizontalSpacer_2->changeSize(0, 0);
}

void InternalLinkWidget::slotCopyInternalLink() const
Expand All @@ -77,7 +79,7 @@ void InternalLinkWidget::slotStyleChanged()
void InternalLinkWidget::customizeStyle()
{
_ui->copyInternalLinkButton->setIcon(Theme::createColorAwareIcon(":/client/theme/copy.svg"));
_ui->internalLinkIconLabel->setPixmap(Theme::createColorAwarePixmap(":/client/theme/public.svg"));
_ui->internalLinkIconLabel->setPixmap(Theme::createColorAwarePixmap(":/client/theme/external.svg"));
}

}
60 changes: 38 additions & 22 deletions src/gui/internallinkwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,51 @@
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../../theme.qrc">:/client/theme/public.svg</pixmap>
<pixmap resource="../../theme.qrc">:/client/theme/external.svg</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="internalLinkLabel">
<property name="text">
<string>Internal link</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalTextLayout">
<item>
<widget class="QLabel" name="internalLinkLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Internal link</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="infoMessage">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(118, 118, 118)</string>
</property>
<property name="text">
<string>Only works for users with access to this folder</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
Expand Down Expand Up @@ -118,22 +150,6 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="infoMessage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(118, 118, 118)</string>
</property>
<property name="text">
<string>Only works for users with access to this folder</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
Expand Down
1 change: 1 addition & 0 deletions theme.qrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
<file>theme/share.svg</file>
<file>theme/reply.svg</file>
<file>theme/magnifying-glass.svg</file>
<file>theme/external.svg</file>
<file>theme/colored/user-status-online.svg</file>
<file>theme/colored/user-status-invisible.svg</file>
<file>theme/colored/user-status-away.svg</file>
Expand Down
1 change: 1 addition & 0 deletions theme/external.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 58c0fa1

Please sign in to comment.