DateChooser: Don't draw weeks if the 'ShowWeek' property is false.

[GB.FORM]
* BUG: DateChooser: Don't draw weeks if the 'ShowWeek' property is false.
* NEW: Some new stock icons.
This commit is contained in:
gambas 2022-04-03 00:42:40 +02:00
parent f295b31469
commit 055fe72fb5
2 changed files with 26 additions and 14 deletions

View file

@ -291,19 +291,25 @@ Public Sub dwgMonth_Draw()
Paint.Font = GetParent().Font Paint.Font = GetParent().Font
Paint.Font.Size = fSize Paint.Font.Size = fSize
dDate = $dStart If $bShowWeek Then
X = 0
Y = YD dDate = $dStart
For J = 0 To 5 X = 0
If Year(dDate) <> Year($dDate) Then Y = YD
iWeek = Week(DateAdd(dDate, gb.Day, 6)) For J = 0 To 5
Else If Year(dDate) <> Year($dDate) Then
iWeek = Week(dDate) iWeek = Week(DateAdd(dDate, gb.Day, 6))
Endif Else
Paint.DrawText(CStr(iWeek), X, Y, XD, H, Align.Center) iWeek = Week(dDate)
Y += H Endif
dDate += 7 Paint.DrawText(CStr(iWeek), X, Y, XD, H, Align.Center)
Next Y += H
dDate += 7
Next
Paint.FillRect(XD, YD, 1, Paint.H - YD, Color.LightForeground)
Endif
dDate = $dStart dDate = $dStart
Y = YD Y = YD

View file

@ -139,16 +139,20 @@ flag-yellow actions/flag-yellow
flip-h actions/object-flip-horizontal flip-h actions/object-flip-horizontal
flip-v actions/object-flip-vertical flip-v actions/object-flip-vertical
floppy devices/media-floppy floppy devices/media-floppy
folder-blue places/folder-blue;places/blue-folder
folder-document places/folder-document;places/folder-documents folder-document places/folder-document;places/folder-documents
folder-download places/folder-download;places/folder-downloads folder-download places/folder-download;places/folder-downloads
folder-green places/folder-green;places/green-folder
folder-home places/user-home folder-home places/user-home
folder-image places/folder-pictures;places/folder-images folder-image places/folder-pictures;places/folder-images
folder-music places/folder-music folder-music places/folder-music
folder-network places/folder-network folder-network places/folder-network
folder-recent places/folder-recent;actions/folder-open-recent folder-recent places/folder-recent;actions/folder-open-recent
folder-red places/folder-red;places/red-folder
folder-remote places/folder-remote folder-remote places/folder-remote
folder-root places/folder-root folder-root places/folder-root
folder-video places/folder-video;places/folder-videos folder-video places/folder-video;places/folder-videos
folder-yellow places/folder-yellow;places/yellow-folder
font [-breeze*]actions/format-text-superscript;preferences/preferences-desktop-font;apps/preferences-desktop-font;preferences/preferences-desktop-font-installer;apps/preferences-desktop-font-installer font [-breeze*]actions/format-text-superscript;preferences/preferences-desktop-font;apps/preferences-desktop-font;preferences/preferences-desktop-font-installer;apps/preferences-desktop-font-installer
formula actions/formula formula actions/formula
forward actions/media-seek-forward forward actions/media-seek-forward
@ -200,6 +204,7 @@ keyboard devices/input-keyboard;preferences/preferences-desktop-k
lamp actions/help-hint lamp actions/help-hint
language [-breeze*]actions/im-google-talk;preferences/preferences-desktop-locale;apps/preferences-desktop-locale language [-breeze*]actions/im-google-talk;preferences/preferences-desktop-locale;apps/preferences-desktop-locale
last actions/go-last last actions/go-last
layer actions/dialog-layer
layout actions/document-page-setup layout actions/document-page-setup
left actions/go-previous left actions/go-previous
library $(mime)/application-x-sharedlib library $(mime)/application-x-sharedlib
@ -267,7 +272,7 @@ pdf $(mime)/application-pdf
pen actions/draw-freehand pen actions/draw-freehand
people [breeze*]actions/user-group-new;preferences/system-users;apps/system-users;preferences/preferences-system-users;apps/preferences-system-users people [breeze*]actions/user-group-new;preferences/system-users;apps/system-users;preferences/preferences-system-users;apps/preferences-system-users
percent actions/format-number-percent percent actions/format-number-percent
phone [-breeze*]devices/smartphone;devices/phone;;preferences/preferences-kde-connect phone devices/phone;;preferences/preferences-kde-connect
pin actions/pin;actions/view-pin pin actions/pin;actions/view-pin
pointer actions/tools-pointer;;preferences/preferences-desktop-cursors;apps/preferences-desktop-cursors pointer actions/tools-pointer;;preferences/preferences-desktop-cursors;apps/preferences-desktop-cursors
play actions/media-playback-start play actions/media-playback-start
@ -327,6 +332,7 @@ shopping #
shortcut apps/accessories-character-map;preferences/preferences-desktop-keyboard-shortcut;apps/preferences-desktop-keyboard-shortcut shortcut apps/accessories-character-map;preferences/preferences-desktop-keyboard-shortcut;apps/preferences-desktop-keyboard-shortcut
shuffle actions/media-playlist-shuffle shuffle actions/media-playlist-shuffle
shutdown apps/system-shutdown;actions/system-shutdown shutdown apps/system-shutdown;actions/system-shutdown
smartphone devices/smartphone;;preferences/preferences-kde-connect
sort-ascent actions/view-sort-ascending;actions/view-sort sort-ascent actions/view-sort-ascending;actions/view-sort
sort-descent actions/view-sort-descending sort-descent actions/view-sort-descending
speaker [breeze*]apps/kmix;devices/audio-speakers;;apps/kmix speaker [breeze*]apps/kmix;devices/audio-speakers;;apps/kmix