diff --git a/comp/src/gb.form.stock/.src/_DefaultStock.class b/comp/src/gb.form.stock/.src/_DefaultStock.class index 655a76dbe..270229c92 100644 --- a/comp/src/gb.form.stock/.src/_DefaultStock.class +++ b/comp/src/gb.form.stock/.src/_DefaultStock.class @@ -6,6 +6,7 @@ Class Image Class SvgImage Static Private $cSynonymous As New Collection +Static Private $cRightToLeft As Collection Static Private $bDebug As Boolean @@ -34,17 +35,45 @@ Static Private Sub Stretch(hImage As Image, iSize As Integer) As Image End -Static Private Sub LoadIcon(sKey As String, iSize As Integer, sStock As String) As Image - - Dim sPath As String +Static Private Sub LoadRightToLeft() - sPath = sStock &/ CStr(iSize) &/ sKey - If System.RightToLeft And If Exist(sPath & "-rtl.png") Then sPath &= "-rtl" - If $bDebug And If iSize = 32 And If Not Exist(sPath & ".png") Then Error "gb.form.stock: unknown icon: " & sKey - Return Image.Load(sPath & ".png") + Dim sKey As String + + $cRightToLeft = New Collection + For Each sKey In Split(File.Load("no-reverse"), "\n") + sKey = Trim(sKey) + If Not sKey Then Continue + If sKey Begins ";" Then Continue + $cRightToLeft[sKey] = True + Next End +Static Private Sub LoadIcon(sKey As String, iSize As Integer, sStock As String) As Image + + Dim sPath As String + Dim hImage As Image + Dim bMirror As Boolean + + sPath = sStock &/ CStr(iSize) &/ sKey + If $bDebug And If iSize = 32 And If Not Exist(sPath & ".png") Then Error "gb.form.stock: unknown icon: " & sKey + 'If System.RightToLeft And If Exist(sPath & "-rtl.png") Then sPath &= "-rtl" + If System.RightToLeft Then + If Not $cRightToLeft Then LoadRightToLeft + If $cRightToLeft.Exist(sKey) Then + If Exist(sPath & "-rtl.png") Then + sPath &= "-rtl" + Else + bMirror = True + Endif + Endif + Endif + + hImage = Image.Load(sPath & ".png") + If bMirror Then hImage = hImage.Mirror(True, False) + Return hImage + +End Static Public Sub LoadImage(sKey As String, iSize As Integer, Optional sStock As String) As Image diff --git a/comp/src/gb.form.stock/gambas-mono/32/clear-rtl.png b/comp/src/gb.form.stock/gambas-mono/32/clear-rtl.png deleted file mode 100644 index c71e6cd6b..000000000 Binary files a/comp/src/gb.form.stock/gambas-mono/32/clear-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/indent-rtl.png b/comp/src/gb.form.stock/gambas-mono/32/indent-rtl.png deleted file mode 100644 index 5d066f6df..000000000 Binary files a/comp/src/gb.form.stock/gambas-mono/32/indent-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/shopping.png b/comp/src/gb.form.stock/gambas-mono/32/shopping.png new file mode 100644 index 000000000..7d23c683e Binary files /dev/null and b/comp/src/gb.form.stock/gambas-mono/32/shopping.png differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/speaker.png b/comp/src/gb.form.stock/gambas-mono/32/speaker.png index 0dee7cfa4..30dc75275 100644 Binary files a/comp/src/gb.form.stock/gambas-mono/32/speaker.png and b/comp/src/gb.form.stock/gambas-mono/32/speaker.png differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/text-list-rtl.png b/comp/src/gb.form.stock/gambas-mono/32/text-list-rtl.png deleted file mode 100644 index 73f6d59d5..000000000 Binary files a/comp/src/gb.form.stock/gambas-mono/32/text-list-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/today.png b/comp/src/gb.form.stock/gambas-mono/32/today.png new file mode 100644 index 000000000..a6ba310c1 Binary files /dev/null and b/comp/src/gb.form.stock/gambas-mono/32/today.png differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/unindent-rtl.png b/comp/src/gb.form.stock/gambas-mono/32/unindent-rtl.png deleted file mode 100644 index 03bd17e5b..000000000 Binary files a/comp/src/gb.form.stock/gambas-mono/32/unindent-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas-mono/32/zoom-normal-rtl.png b/comp/src/gb.form.stock/gambas-mono/32/zoom-normal-rtl.png new file mode 100644 index 000000000..7e7162bb3 Binary files /dev/null and b/comp/src/gb.form.stock/gambas-mono/32/zoom-normal-rtl.png differ diff --git a/comp/src/gb.form.stock/gambas/128/shopping.png b/comp/src/gb.form.stock/gambas/128/shopping.png new file mode 100644 index 000000000..27335510b Binary files /dev/null and b/comp/src/gb.form.stock/gambas/128/shopping.png differ diff --git a/comp/src/gb.form.stock/gambas/128/speaker.png b/comp/src/gb.form.stock/gambas/128/speaker.png index 76a742325..7e7309228 100644 Binary files a/comp/src/gb.form.stock/gambas/128/speaker.png and b/comp/src/gb.form.stock/gambas/128/speaker.png differ diff --git a/comp/src/gb.form.stock/gambas/32/clear-rtl.png b/comp/src/gb.form.stock/gambas/32/clear-rtl.png deleted file mode 100644 index c71e6cd6b..000000000 Binary files a/comp/src/gb.form.stock/gambas/32/clear-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas/32/indent-rtl.png b/comp/src/gb.form.stock/gambas/32/indent-rtl.png deleted file mode 100644 index 5d066f6df..000000000 Binary files a/comp/src/gb.form.stock/gambas/32/indent-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas/32/shopping.png b/comp/src/gb.form.stock/gambas/32/shopping.png new file mode 100644 index 000000000..7d23c683e Binary files /dev/null and b/comp/src/gb.form.stock/gambas/32/shopping.png differ diff --git a/comp/src/gb.form.stock/gambas/32/speaker.png b/comp/src/gb.form.stock/gambas/32/speaker.png index 7a569185a..d71917eff 100644 Binary files a/comp/src/gb.form.stock/gambas/32/speaker.png and b/comp/src/gb.form.stock/gambas/32/speaker.png differ diff --git a/comp/src/gb.form.stock/gambas/32/subtitle.png b/comp/src/gb.form.stock/gambas/32/subtitle.png index 8322164f9..89b3faa89 100644 Binary files a/comp/src/gb.form.stock/gambas/32/subtitle.png and b/comp/src/gb.form.stock/gambas/32/subtitle.png differ diff --git a/comp/src/gb.form.stock/gambas/32/text-list-rtl.png b/comp/src/gb.form.stock/gambas/32/text-list-rtl.png deleted file mode 100644 index 73f6d59d5..000000000 Binary files a/comp/src/gb.form.stock/gambas/32/text-list-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas/32/today.png b/comp/src/gb.form.stock/gambas/32/today.png new file mode 100644 index 000000000..4802eae89 Binary files /dev/null and b/comp/src/gb.form.stock/gambas/32/today.png differ diff --git a/comp/src/gb.form.stock/gambas/32/unindent-rtl.png b/comp/src/gb.form.stock/gambas/32/unindent-rtl.png deleted file mode 100644 index 03bd17e5b..000000000 Binary files a/comp/src/gb.form.stock/gambas/32/unindent-rtl.png and /dev/null differ diff --git a/comp/src/gb.form.stock/gambas/32/zoom-normal-rtl.png b/comp/src/gb.form.stock/gambas/32/zoom-normal-rtl.png new file mode 100644 index 000000000..7e7162bb3 Binary files /dev/null and b/comp/src/gb.form.stock/gambas/32/zoom-normal-rtl.png differ diff --git a/comp/src/gb.form.stock/no-reverse b/comp/src/gb.form.stock/no-reverse new file mode 100644 index 000000000..8f9197084 --- /dev/null +++ b/comp/src/gb.form.stock/no-reverse @@ -0,0 +1,98 @@ +attach +audio +battery +bicycle +bookmark +brush +call +clear +cloud +color-picker +computer +connect +copy +crop +cut +desktop +development +difference +disconnect +download +draw-arrow +draw-line +draw-path +edit +energy +erase +exclusive +fill +find +group +hardware +hatch +highlight +indent +internet +intersection +join-bevel +join-miter +join-round +key +keyboard +language +layout +link +lower +monitor +muted +options +pen +people +pin +plane +plugin +pointer +preview +raise +rename +replace +scanner +science +shopping +sort-ascent +sort-descent +statistics +tablet +template +text-baseline +text-bigger +text-bottom +text-line-spacing +text-list +text-list-order +text-middle +text-smaller +text-top +tools +town +transparency +trash-full +unindent +union +unlock +user-group +view-detail +view-tree +volume-high +volume-low +volume-medium +volume +walk +window +wizard +wrap +zoom-fit +zoom-in +zoom-normal +zoom-out +zoom-width \ No newline at end of file