Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar picker. #10 #26

Merged
merged 9 commits into from
Jun 2, 2022
Merged

Calendar picker. #10 #26

merged 9 commits into from
Jun 2, 2022

Conversation

itsjustdel
Copy link
Contributor

@itsjustdel itsjustdel commented Jun 1, 2022

Deviations from design:
Small inset of date button due to button padding
Colours
Calendar popup position is the same regardless of scroll position or button clicked, to be changed?
No dropdown arrow icon next to date button

image

Copy link
Contributor

@Bluebugs Bluebugs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have a silly question, but isn't the grid layout a possibility here?

location.go Outdated
}

func calendar(l *location) {
l.calendar = container.New(NewCalendarLayout(32), calendarObjects(l)...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to move all the function and logic related to the Calendar to its own file? I would also expect a l.calendar := newCalendar().

location.go Outdated
b := container.New(layout.NewBorderLayout(nil, nil, l.monthPrevious, l.monthNext),
l.monthPrevious, l.monthNext, container.NewCenter(l.monthLabel))

l.dateContainer = container.NewVBox(b, l.calendar)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also an newCalendarPopup() with showAtPosition function.

location.go Outdated
monthNext *widget.Button

dateContainer *fyne.Container
calendar *fyne.Container
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that you actually need to store this here.

@itsjustdel
Copy link
Contributor Author

I also have a silly question, but isn't the grid layout a possibility here?

I initially tried to use grid but it it takes the padding from the main theme so was spaced out too much. The calendar also moved around as you changed the month as it tried to adjust to the different layouts of the days/dates

This will matter when the text changes
location.go Outdated Show resolved Hide resolved
@itsjustdel itsjustdel merged commit bbc9661 into main Jun 2, 2022
@itsjustdel itsjustdel deleted the feature/date-picker branch June 2, 2022 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants