From 45b91d444fe0df5986983a28f048cd749c0c4d1f Mon Sep 17 00:00:00 2001 From: Maxim Solodovnik Date: Wed, 23 Aug 2023 22:45:58 +0700 Subject: [PATCH] [WICKET-7068] Tree styles are updated to be RTL-friendly (#600) --- .../tree/theme/human/folder-rtl-other.gif | Bin 0 -> 1046 bytes .../repeater/tree/theme/human/folder-rtl.gif | Bin 0 -> 577 bytes .../html/repeater/tree/theme/human/theme.css | 58 +++++++++++++++++- .../repeater/tree/theme/human/tree-rtl.gif | Bin 0 -> 190 bytes .../tree/theme/windows/folder-rtl-closed.gif | Bin 0 -> 369 bytes .../tree/theme/windows/folder-rtl-open.gif | Bin 0 -> 376 bytes .../tree/theme/windows/folder-rtl-other.gif | Bin 0 -> 573 bytes .../repeater/tree/theme/windows/theme.css | 56 ++++++++++++++++- .../repeater/tree/theme/windows/tree-rtl.gif | Bin 0 -> 3729 bytes 9 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl-other.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/tree-rtl.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/folder-rtl-closed.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/folder-rtl-open.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/folder-rtl-other.gif create mode 100644 wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/tree-rtl.gif diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl-other.gif b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl-other.gif new file mode 100644 index 0000000000000000000000000000000000000000..99f3c29a2c90e565d9b244eee4dce1baf99be8c3 GIT binary patch literal 1046 zcmeIx+e=dc00!`5C|<%8Lvyr532l)@5|J4WT{ZQg5DE$kLJ=_vLVbxSP#?^^&M~*< zE}l)DsZ;0L)^57ZrKBdd*=%QLbCY}1Lv#jpm`NXI(HJZm zlTBxh(Agl9&0&nhu|O`9JH{U6f#VaLchlpOC_ZnB&zqT><_o3-LcZ|*{JdypUNkEd z&xvJ1sZ1=Di==X~Oo5Wf6%v_JB47BRSd=Ok-BhiyI!B$=lA#mUVp$F2>Jp+e=y_^g#)2*FdPnr_k!WQP~=bK;PBuO zP4qAt7mdcEvA7rj{P)iqD2OB`q@e>818Cx(08)Meu~cle0MxYKYIyGXqR}R27Lu{p zdO~_$MQ({6Q+Kf|y}V}WWkGAv1_O^x!>0}=*LGtrw|I<$jhmev=cuI2=Ih1fTsfchJtkoSM_F^9HH{eP+8RXMM60Z43;aYZiP8!j3eEjCooTf)oko%fYnfyw4 zcakuEVd(7r{c7ANaPtJV^l8d$|#WLfw{- P$i0Va5xmf}0oVQl6c7`v literal 0 HcmV?d00001 diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl.gif b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/folder-rtl.gif new file mode 100644 index 0000000000000000000000000000000000000000..181b7693c43cdd279f64e258c4083cbc69485d07 GIT binary patch literal 577 zcmZ?wbhEHb6k-r!IF`)NQdQDgUD{e*)>>26T3goJRJ*w;VM1r?wBGhNb!xAh^&Yp_ z{BDq6F{S5Cr}4Czv%Yoc%$zy%@Wi~&T_&&k^gs3J&YCl4_MACCy3IfL8hz^1nKgI* z?74Gi&z<*Xg8Aou!#VTjfA2S*JAeMM>1Ffg&wo4B=F1e*l?!GsS+eB&bi*IhEWXYF zBDEmWKXX=JIQq>-QCL-&dtQSYNk)>)Hcb*Bsoo?)%#OL)+JV zUswENecqpSMK`z4Ik9{Fja`d>Y^}JtYtgN}%m44J`?jvhIGc>m7>UB3=b zxN_m-?F&b*U%!6)_RT+c4nBYW=>Px!3=A|uia%KxxftphbQpjD6ekSq^BU@#np;}i z+B-VCI^s0M`^7Zc1gA`iPnt1Pw?#d1=FHHAp-C#uk!~Tu!GZqsXDT)GCT!jk;Nk7* z9-E}F(cU*GEGl}-X452@jiNfnmUfOVu3kQVMoF?8rS$Yo47JtdC50uFlcYCl+Bi5n z*_vr73h)TU@NX0`x3ab{P?h8364Eg!NVp)%!pxx|av;E=fq{W5A<|{zqNCj%OpFZH E071GEJOBUy literal 0 HcmV?d00001 diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/theme.css b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/theme.css index 7ca0a9ecd0d..d56aaeae666 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/theme.css +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/theme.css @@ -20,6 +20,10 @@ padding: 0px; } +html[dir="rtl"] .tree-theme-human div.tree-subtree { + margin: 0px 18px 0px 0px; +} + .tree-theme-human div.tree-branch { margin: 0px; padding: 0px; @@ -39,6 +43,10 @@ width: 18px; } +html[dir="rtl"] .tree-theme-human .tree-junction { + float: right; +} + .tree-theme-human .tree-junction-expanded { display: block; float: left; @@ -49,10 +57,20 @@ text-decoration: none; } +html[dir="rtl"] .tree-theme-human .tree-junction-expanded { + float: right; + background-image: url(tree-rtl.gif); + background-position-x: -36px; +} + .tree-theme-human .tree-junction-expanded:hover { background-position: -54px center; } +html[dir="rtl"] .tree-theme-human .tree-junction-expanded:hover { + background-position-x: 0px; +} + .tree-theme-human .tree-junction-collapsed { display: block; float: left; @@ -63,15 +81,29 @@ text-decoration: none; } +html[dir="rtl"] .tree-theme-human .tree-junction-collapsed { + float: right; + background-image: url(tree-rtl.gif); + background-position-x: -54px; +} + .tree-theme-human .tree-junction-collapsed:hover { background-position: -36px center; } +html[dir="rtl"] .tree-theme-human .tree-junction-collapsed:hover { + background-position: -18px center; +} + .tree-theme-human span.tree-content { display: block; margin-left: 18px; } +html[dir="rtl"] .tree-theme-human span.tree-content { + margin-right: 18px; +} + /* tabletree */ .tree-theme-human table { @@ -105,22 +137,46 @@ } .tree-theme-human .tree-folder-closed { + display: inline-block; padding-left: 18px; background-image: url(folder.gif); background-position: 0px 50%; background-repeat: no-repeat; } +html[dir="rtl"] .tree-theme-human .tree-folder-closed { + background-image: url(folder-rtl.gif); + background-position-x: right; + padding-right: 18px; + padding-left: initial; +} + .tree-theme-human .tree-folder-open { + display: inline-block; padding-left: 18px; background-image: url(folder.gif); background-position: 0px 50%; background-repeat: no-repeat; } +html[dir="rtl"] .tree-theme-human .tree-folder-open { + background-image: url(folder-rtl.gif); + background-position-x: right; + padding-right: 18px; + padding-left: initial; +} + .tree-theme-human .tree-folder-other { + display: inline-block; padding-left: 18px; background-image: url(folder-other.gif); background-position: 0px 50%; background-repeat: no-repeat; -} \ No newline at end of file +} + +html[dir="rtl"] .tree-theme-human .tree-folder-other { + background-image: url(folder-rtl-other.gif); + background-position-x: right; + padding-right: 18px; + padding-left: initial; +} diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/tree-rtl.gif b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/tree-rtl.gif new file mode 100644 index 0000000000000000000000000000000000000000..085edf3ed3618100f27e9ec3a984c654bfc1b21f GIT binary patch literal 190 zcmZ?wbhEHb^k5KTIK;{T1OfsA%F4>^?d^vTA7)_q4?&7QSs1w(*co&{DnM!(n42qh z-T7y5%5(Kzi)>f3cX6&P3q7U@DbCSYvMF~lQ^B4U$tG+y@0_`i;b;{<>Ei}RfdT zMSgXq@QJAg2YNM*9XqzJMr>9F(~2^IHB}=2ujK##G5PiD*Z=>|`G33g|C9Rv?>o0` z+x8y>W->7RCj%+|WMSlDuxHR=00NMo7})v_%rEfJk?KFOM2M54L}Kzm2TlbU4UuVO zRy-jx6MGji3eGqy@b10wrCs;mofIg{ocr!aO}Al;WK=_AQ-egUkgjTHSGTTMEvK&5 zq{&ls*=xCVHD}M6t1DNlsH?GL=`vm3Vt!qfwd>aFayhd~@^fgASS+5fVJJ%B)xd3?zFsohHvbYw}Ki>7}gm1yV^jW}Ha) zv1i^iiG6;uiiXWCt<6sQ?5c(`#svk&h8y*@jF`ymI^kIy-mmT;|N8z{btRF0R6O{P-qkRu=tp=P$6Zy7=l{yMAN2x2Ge6 FH2~K|sQ&-} literal 0 HcmV?d00001 diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/folder-rtl-other.gif b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/folder-rtl-other.gif new file mode 100644 index 0000000000000000000000000000000000000000..1e3039740e51bfcb72bdedd9abaff9e3ce0cbd7b GIT binary patch literal 573 zcmZ?wbhEHb6k-r!IOfRk`}gnn@8AFU{r~N^{|65qeDdVU-@kuvy#9aS{{Mgf|9}4Z z|M0{AU%q_(`SWMv)Wg{&OV2(3AD1{GbotxKt1eYFZ#Zz^|ILSQTV|i?T5|Ba{La?4kwX3c6}c&WZ`PygnpJ?rkDyZry# zum9<}^Zxw(U)#BD%KlHsjvf2=@89j`-!lsqXDlMlObW1|0?<0L2Ld`>clgrskH`w)T#8 z21Zk}zJ4>kwr*ilF&;Ty1~v!jHb!|NQ$r?Bhvf!RZThBbm1LJLXH##plo8dmv0-Ln zTCTCxgx%hL7xNw+iLJ)whwbckb7`q=RaP)Ra{i+DR(=bM8}_$s__i8x-+y>ZZL2oN y3-ec!x?5EgIqnO*5@}-*v}IuCG6`uo(AUhtFQj3h+0fT6AkW4yK_gIs!5RRkHw{Yw literal 0 HcmV?d00001 diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/theme.css b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/theme.css index 9e68b9a699a..fa4b9014d99 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/theme.css +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/theme.css @@ -20,6 +20,11 @@ padding: 0px; } +html[dir="rtl"] .tree-theme-windows div.tree-subtree { + margin: 0px 18px 0px 0px; + padding: 0px; +} + .tree-theme-windows div.tree-branch { margin: 0px; padding: 0px; @@ -31,6 +36,11 @@ background-repeat: repeat-y; } +html[dir="rtl"] .tree-theme-windows div.tree-branch-mid { + background-image: url(tree-rtl.gif); + background-position-x: calc(100%/* to skip */ +/* minimizer */ 54px); +} + .tree-theme-windows div.tree-branch-last { } @@ -45,6 +55,12 @@ background-repeat: no-repeat; } +html[dir="rtl"] .tree-theme-windows .tree-junction { + float: right; + background-image: url(tree-rtl.gif); + background-position-x: -18px; +} + .tree-theme-windows .tree-junction-expanded { display: block; float: left; @@ -55,6 +71,12 @@ text-decoration: none; } +html[dir="rtl"] .tree-theme-windows .tree-junction-expanded { + float: right; + background-image: url(tree-rtl.gif); + background-position-x: -36px; +} + .tree-theme-windows .tree-junction-collapsed { display: block; float: left; @@ -65,11 +87,22 @@ text-decoration: none; } +html[dir="rtl"] .tree-theme-windows .tree-junction-collapsed { + float: right; + background-image: url(tree-rtl.gif); + background-position-x: -54px; +} + .tree-theme-windows span.tree-content { display: block; margin-left: 18px; } +html[dir="rtl"] .tree-theme-windows span.tree-content { + margin-right: 18px; + margin-left: initial; +} + /* tabletree */ .tree-theme-windows table { @@ -111,6 +144,13 @@ background-repeat: no-repeat; } +html[dir="rtl"] .tree-theme-windows .tree-folder-closed { + padding-right: 18px; + padding-left: initial; + background-image: url(folder-rtl-closed.gif); + background-position-x: right; +} + .tree-theme-windows .tree-folder-open { padding-left: 18px; background-image: url(folder-open.gif); @@ -118,9 +158,23 @@ background-repeat: no-repeat; } +html[dir="rtl"] .tree-theme-windows .tree-folder-open { + padding-right: 18px; + padding-left: initial; + background-image: url(folder-rtl-open.gif); + background-position-x: right; +} + .tree-theme-windows .tree-folder-other { padding-left: 18px; background-image: url(folder-other.gif); background-position: 0px 50%; background-repeat: no-repeat; -} \ No newline at end of file +} + +html[dir="rtl"] .tree-theme-windows .tree-folder-other { + padding-right: 18px; + padding-left: initial; + background-image: url(folder-rtl-other.gif); + background-position-x: right; +} diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/tree-rtl.gif b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/theme/windows/tree-rtl.gif new file mode 100644 index 0000000000000000000000000000000000000000..91ad7cdfe5a50407e21dca53ac55a9b750a929e1 GIT binary patch literal 3729 zcmV;C4sP*BNk%w1VMqYb2f_yc0001#l$5=_z0S_g-rnBl=jZ?b{{R60A^8LW3IGQH zEC2ui07wAP2LJ>9c)D7`FdirCd^XYyH(%a&i6BOXAIhm2Yq=FH$(kwBot^3{-}*0L zOgJOfNDX5SIYQzX&k{45oGPJLsWV&MTEE`#iQ625&EgxGT2`Ok>D^l%@6GM?-(8;% z?)`m3e}aKUgNB7iiA#%Ehl*&CaFTSCc$R#afSQDyh@Oy>qLrhUrJ1Ljshz8zt)Zl` zrn0ECs06} zl#7$DPP;tSj>Vf)Z(F}_0ml_QmvCLfcM<1B+f{L2#%Im)tvWd^y7XGmkx!FWZF(U1-`1Ub@NVC|3;z}#{P1w&#Sm|=w&cBr9;9DXQbh$KQs zo{96J2%w4!vPhwe8^Q>pj3d%mqIA)Db|Q{D>X;&rKl->LkV6XDB9TWL`67}_Dj6e_ zPdYgxlv7GsBb8TLd83v#c8TSdq4gMMkYg5EW|C(%nP!x0R@r8jZ-N<{nRB99rZD zsHBQYW~qdBit3}AraG#rbi!(%VA>Zh)Nx_T+QMbru!wt54t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