From 57cee64966009cf8f1e3f7081b4a7bce7ae9c9c5 Mon Sep 17 00:00:00 2001 From: defnax Date: Fri, 21 Jan 2022 11:35:08 +0100 Subject: [PATCH] Fix default fonts & font metrics for Shared Files Tree --- .../gui/FileTransfer/SharedFilesDialog.cpp | 4 ++ .../src/gui/FileTransfer/SharedFilesDialog.ui | 5 +++ retroshare-gui/src/gui/RemoteDirModel.cpp | 2 +- retroshare-gui/src/gui/icons.qrc | 1 + .../src/gui/icons/folder-account.svg | 38 ++++++++++++++++++ retroshare-gui/src/gui/icons/folder-open.svg | 38 ++++++++++++++++++ retroshare-gui/src/gui/icons/folder.png | Bin 903 -> 1036 bytes retroshare-gui/src/gui/icons/folder.svg | 38 ++++++++++++++++++ retroshare-gui/src/gui/icons/folderopen.png | Bin 1704 -> 1627 bytes 9 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 retroshare-gui/src/gui/icons/folder-account.svg create mode 100644 retroshare-gui/src/gui/icons/folder-open.svg create mode 100644 retroshare-gui/src/gui/icons/folder.svg diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index 61e01ab24..9ca80dea4 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -231,6 +231,10 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent) /* Set Multi Selection */ ui.dirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection); + QFontMetricsF fontMetrics(ui.dirTreeView->font()); + int iconHeight = fontMetrics.height() * 1.5; + ui.dirTreeView->setIconSize(QSize(iconHeight, iconHeight)); + /* Hide platform specific features */ copylinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Links to Clipboard" ), this ); connect( copylinkAct , SIGNAL( triggered() ), this, SLOT( copyLink() ) ); diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui index 6915c1c44..4207aa042 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui @@ -352,6 +352,11 @@ border-image: url(:/images/closepressed.png) 0 + + + 11 + + Qt::CustomContextMenu diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index 0cfcc9772..a6f31a428 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -136,7 +136,7 @@ void RetroshareDirModel::treeStyle() { categoryIcon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/folder.png"), QIcon::Normal, QIcon::Off); categoryIcon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/folderopen.png"), QIcon::Normal, QIcon::On); - peerIcon = FilesDefs::getIconFromQtResourcePath(":/images/user/identity16.png"); + peerIcon = FilesDefs::getIconFromQtResourcePath(":/icons/folder-account.svg"); } void TreeStyle_RDM::update() { diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index 48071b201..d28594130 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -340,5 +340,6 @@ icons/notification.png icons/wire.png icons/wire-circle.png + icons/folder-account.svg diff --git a/retroshare-gui/src/gui/icons/folder-account.svg b/retroshare-gui/src/gui/icons/folder-account.svg new file mode 100644 index 000000000..1247cb476 --- /dev/null +++ b/retroshare-gui/src/gui/icons/folder-account.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/retroshare-gui/src/gui/icons/folder-open.svg b/retroshare-gui/src/gui/icons/folder-open.svg new file mode 100644 index 000000000..2cd0d4905 --- /dev/null +++ b/retroshare-gui/src/gui/icons/folder-open.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/retroshare-gui/src/gui/icons/folder.png b/retroshare-gui/src/gui/icons/folder.png index 01f9426283672e5f1b6e79ad74104caed3781c65..50b84dc5678adb0c613c4f96ad0ac1e6892982a1 100644 GIT binary patch literal 1036 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSoCO|{#S9F7dqJ47I4eU0C@5Lt z8c`CQpH@mmtT}V`<;yx0|WC+PZ!6KiaBp@?eCUJl{xXdzS|VJM-~3@_x_C*c`q&{S*Pa_GN8MJ7C@tFEo-kAG8(VL> zpzh(F-d)1dopZVtHG1^jeV)B=0i)sPGiTrQ|J)b<)rLQQ#`kl!#&cMJPC^0=t>RfX zmwvAdyi@-DV#d#l0wwEHPH%k^J&|>{$Zqy?=Ze}~H|}Pz+gDRvw)k_@riDoFfE;irjWFP?c%nmJdGZSi)Hs27*Q z`+T|SB}*1YN~NYP@BX*J{I%sX-&?{8DR=AyEzubPTMRI?-A+1 zpevkmep!q^!`oty_wjmv^($E}*e$%QDW_9y$hak7%cuEoIT!RceVej(3d0;_hUXjy zESU=W1_5(j34`OVYfltb_;Y;RzUlfjK84K{TW?v+*mmaArSGds7_2`Yo3_MW%eN(S z*S^oc@8zG4i}}Y>@ajXUr}!$LmX*Ik*58T$)jq3?gXfyR9Q)hUI@l*B#m!HLx>ilBckNq{`w3@j~FVdQ&MBb@05pWn0RR91 literal 903 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H3?#oinD`S&v7|ftIx;Y9?C1WI$O_~uBzpw; zGB8xB0oAoIF#H0kf5E^|YQVtoDuIE)Y6b&?c)^@qfi^&iV*x%Pu0WdM|9^)0SJ`G? zW}SVVb>=mOnRi*|US^(km3cN4F)Xr&%VYm2c!%r z2qJ-6W?ci44AU<{v@p-U0%R~uzs?F)#xVUR^PDR{#XzG#;)^aqECOm_ntg>~=4FuJ z>>EIm1*GvB$i~?hLF8PZ;1%XMR~e=PHG<4!o^y?1Hds9agM^yNE1*XlN`m}?85kw> zjE(qB=Dzxt#<%oep6pf5Gx<|gel>pTim(;?dnEFdg5gu?<=vORaDRN)P^;3 z^D>us7tZII{bH85%<`D`K(iQ=yxm;OkH}&M2EHR8%s5q>PZ}u5UgGKN z%Kn5&jMtE-v!UQFP>+SDi(^Q|t+%&t1|2exXnUxjq_j2buK215@guc|MbG|?pK5!F zS{aH5my3_WypDBi0=jeM+Z+fr4 z{>J(1iYLP6e)B#U6>(tKYKqp-=}zm0Xkxq!^40j0|)QjC75RLJWlpinR(g8$%zH2dih1^v)|cB0TnTL My85}Sb4q9e02M7>=>Px# diff --git a/retroshare-gui/src/gui/icons/folder.svg b/retroshare-gui/src/gui/icons/folder.svg new file mode 100644 index 000000000..4989f5d1c --- /dev/null +++ b/retroshare-gui/src/gui/icons/folder.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/retroshare-gui/src/gui/icons/folderopen.png b/retroshare-gui/src/gui/icons/folderopen.png index 544e5f0b74e8298701404b43ed64cf356abde0c2..9f83b25617c391750c5b7bda6e677d52a649d07a 100644 GIT binary patch delta 1587 zcmZ9Me>Bs37{@=~OYfK_FH-soZ<~LEIlkfMshlP?T#a-nt zx6~~^R!Cd6lypnwM`;mO?#&RJRdliKu0Oixp8K5hocHVb3CRG!|L)g@G7?xu#cT8Okqu5eTNw5^l)CHU@tf=)PdNaY#V@PE)~6UsbwG+!UzsUN5IVVG?#uN4 z=EO~)WB621dNm(9s+ePZ%(G`-uu*xjf~6;!Fzjyu8kul z=2ozReuKAYGjgadD_aV(%S6^eKA@vIm%Ddzp7qZD%U@^?&UTv_ zf@ih7K9(pT35YY_8O-k9=+*cnmJENom=1)f170q}tFVgY_J0|=VtkdPQVt88SAamQEgA0spA;O<;^NWW zRRi~{+G4o|=x$!LP7Yi4C^R2pg-00_1jIVDgIi94n=dqB(A~Y647gu=iD9yH8eXJd zk1(9))6i_62iXk<6UqHt1w{yfB_DEZu+j!*hubdhTycr1C5Q&`hb-;MV0})HUz%-6IW~4Sf-`M2M+UFpIOm7A`aC2AfQkWTYo%uf zg`eMGs%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