From 0fb2c322dab1dda64004c0eff801976d2c4a0f5c Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Wed, 26 Aug 2026 20:30:34 -0300
Subject: KOrganizer: add holiday tooltips to month view
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Show a formatted tooltip for holidays in the month view.

Display holiday names, the formatted date and the day of year, using the same general layout as incidence tooltips.

This addresses the review feedback from TDE/tdepim#97.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 korganizer/komonthview.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 23b477e1..af0639d5 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -81,6 +81,15 @@ void KOMonthCellToolTip::maybeTip( const TQPoint &pos )
     r=eventlist->itemRect( it );
     /* Show the tip */
     TQString tipText( IncidenceFormatter::toolTipStr( mCalendar, i->incidence(), mDate ) );
+    if ( tipText.isEmpty() && !i->incidence() ) {
+      const TQStringList holidays = KOGlobals::self()->holiday( mDate );
+      tipText = "<qt><b>" + holidays.join( "<br/>" ) + "</b><br/>----------<br/>";
+      tipText += i18n( "<i>Date:</i>&nbsp;%1" )
+                 .arg( TDEGlobal::locale()->formatDate( mDate ).replace( " ", "&nbsp;" ) );
+      tipText += "<br/>" + i18n( "<i>Day of year:</i>&nbsp;%1" )
+                 .arg( KOGlobals::self()->calendarSystem()->dayOfYear( mDate ) );
+      tipText += "</qt>";
+    }
     if ( !tipText.isEmpty() ) {
       tip( r, tipText );
     }
-- 
cgit v1.2.3

