HaikuArchives / Calendar

:calendar: A native Calendar application for Haiku.
MIT License
30 stars 20 forks source link

Make date header the "Today" button #98

Closed JadedCtrl closed 3 years ago

JadedCtrl commented 3 years ago

This replaces the toolbar's "Today" button with the date header functioning as the "Today" button, being a solution mentioned for #66.

Whenever the cursor hovers over the date header, it displays as a button. Otherwise, it looks like normal-- the only real difference is that the "day" is a little farther to the right (as it being in the same position as before looks weird next to the button frame).

screenshot

humdingerb commented 3 years ago

Nice! Should we add a tooltip "Go to today", same text as the menu item in the View menu?

JadedCtrl commented 3 years ago

Good idea, just added :)

humdingerb commented 3 years ago

I'm wondering... would it be OK to use "MainWindow" instead of "DateHeaderButton" as B_TRANSLATION_CONTEXT, or is that bad style. That way "Go to today" would appear only once for the translators...

pulkomandy commented 3 years ago

It's not necessarily bad style, but would the translation always be the same? To take an example in english, themenu could be imperative ("go to today") while the tooltip could be informative ("goes to today")

humdingerb commented 3 years ago

Good thinking! I think you're right. Let's keep it like it is now and merge. Thanks for the feedback!