[pim/korganizer] /: Allow changing the color of the navigator grid date-range highlight

Allen Winter <[email protected]>
Newsgroups gmane.comp.kde.cvs,gmane.comp.kde.doc
Message-ID <[email protected]>
Git commit 0255864b30a159b65c5c1e3a3a29a1a1f98df95b by Allen Winter.
Committed on 21/07/2026 at 14:19.
Pushed by winterz into branch 'master'.

Allow changing the color of the navigator grid date-range highlight

M  +6    -0    doc/index.docbook
M  +1    -1    src/kodaymatrix.cpp
M  +1    -0    src/org.kde.korganizer.appdata.xml
M  +10   -3    src/prefs/koprefsdialogcolorsandfonts.cpp
M  +6    -7    src/settings/korganizer.kcfg

https://invent.kde.org/pim/korganizer/-/commit/0255864b30a159b65c5c1e3a3a29a1a1f98df95b

diff --git a/doc/index.docbook b/doc/index.docbook
index e62d8cb59..22aeea45a 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -2457,6 +2457,12 @@ allowing you to select the to-do overdue color.</para></listitem>
       allowing you to select the background color for today's date in Month view.</para></listitem>
 </varlistentry>
 
+<varlistentry>
+   <term><guilabel>Navigator grid highlight color</guilabel></term>
+   <listitem><para>This button opens the <guilabel>Select Color</guilabel> dialog,
+       allowing you to select the color for highlighting the currently selected date range in the navigator.</para></listitem>
+ </varlistentry>
+
 <varlistentry>
 <term><guilabel>Tags</guilabel></term>
 <listitem><para>This group allows you to assign a color to each tag. Select
diff --git a/src/kodaymatrix.cpp b/src/kodaymatrix.cpp
index 33f08d5c8..5544f5792 100644
--- a/src/kodaymatrix.cpp
+++ b/src/kodaymatrix.cpp
@@ -668,7 +668,7 @@ void KODayMatrix::paintEvent(QPaintEvent *)
             row = 0;
         }
         column = mSelStart - row * 7;
-        const QColor selectionColor = KOPrefs::instance()->agendaGridHighlightColor();
+        const QColor selectionColor = KOPrefs::instance()->navigatorGridHighlightColor();
 
         if (row < 6 && row >= 0) {
             if (row == mSelEnd / 7) {
diff --git a/src/org.kde.korganizer.appdata.xml b/src/org.kde.korganizer.appdata.xml
index 91fca22cf..420bab84c 100644
--- a/src/org.kde.korganizer.appdata.xml
+++ b/src/org.kde.korganizer.appdata.xml
@@ -484,6 +484,7 @@
         <p xml:lang="tr">Özellikler</p>
         <p xml:lang="uk">Можливості</p>
         <ul>
+          <li>Navigator: the highlight color for the navigator grid can now be changed.  To configure the color, set the "Navigator grid highlight color" in the Colors and Fonts settings</li>
           <li>Kontact summary: ask before deleting incidences</li>
           <li xml:lang="ca">Resum del Kontact: pregunta abans de suprimir les incidències</li>
           <li xml:lang="ca-valencia">Resum de Kontact: pregunta abans de suprimir les incidències</li>
diff --git a/src/prefs/koprefsdialogcolorsandfonts.cpp b/src/prefs/koprefsdialogcolorsandfonts.cpp
index 91bcbf7ad..675c88670 100644
--- a/src/prefs/koprefsdialogcolorsandfonts.cpp
+++ b/src/prefs/koprefsdialogcolorsandfonts.cpp
@@ -96,9 +96,16 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QObject *parent, const
     colorLayout->addWidget(monthTodayColor->label(), 9, 0);
     colorLayout->addWidget(monthTodayColor->button(), 9, 1);
 
+    // Navigator grid highlight color
+    Korganizer::KPrefsWidColor *navGridColor = addWidColor(KOPrefs::instance()->navigatorGridHighlightColorItem(), colorFrame);
+    navGridColor->label()->setToolTip(navGridColor->button()->toolTip());
+    navGridColor->label()->setWhatsThis(navGridColor->button()->whatsThis());
+    colorLayout->addWidget(navGridColor->label(), 10, 0);
+    colorLayout->addWidget(navGridColor->button(), 10, 1);
+
     // categories colors
     auto categoryGroup = new QGroupBox(i18nc("@title:group", "Tags"), colorFrame);
-    colorLayout->addWidget(categoryGroup, 10, 0, 1, 2);
+    colorLayout->addWidget(categoryGroup, 11, 0, 1, 2);
 
     auto categoryLayout = new QGridLayout;
     categoryGroup->setLayout(categoryLayout);
@@ -128,7 +135,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QObject *parent, const
 
     // resources colors
     auto resourceGroup = new QGroupBox(i18nc("@title:group", "Resources"), colorFrame);
-    colorLayout->addWidget(resourceGroup, 11, 0, 1, 2);
+    colorLayout->addWidget(resourceGroup, 12, 0, 1, 2);
 
     QBoxLayout *resourceLayout = new QHBoxLayout;
     resourceGroup->setLayout(resourceLayout);
@@ -151,7 +158,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QObject *parent, const
     connect(mResourceButton, &KColorButton::changed, this, &KOPrefsDialogColorsAndFonts::setResourceColor);
     resourceLayout->addWidget(mResourceButton);
 
-    colorLayout->setRowStretch(12, 1);
+    colorLayout->setRowStretch(13, 1);
 
     auto fontFrame = new QWidget(widget());
     tabWidget->addTab(fontFrame, QIcon::fromTheme(QStringLiteral("preferences-desktop-font")), i18nc("@title:tab", "Fonts"));
diff --git a/src/settings/korganizer.kcfg b/src/settings/korganizer.kcfg
index 1c2afa188..7edf697c6 100644
--- a/src/settings/korganizer.kcfg
+++ b/src/settings/korganizer.kcfg
@@ -367,6 +367,12 @@
       <whatsthis>In Month View, select the background color for today's date.</whatsthis>
       <default>221, 251, 232</default>
     </entry>
+    <entry key="Navigator Grid Highlight Color" type="Color">
+      <label>Navigator grid highlight color</label>
+      <tooltip>Set the navigator grid highlight color here</tooltip>
+      <whatsthis>Select the color for highlighting the currently selected date range in the navigator.</whatsthis>
+      <default>100, 100, 255</default>
+    </entry>
   </group>
   <!-- Colors and Fonts Page: Fonts Tab -->
   <group name="Fonts">
@@ -444,11 +450,4 @@
       <default/>
     </entry>
   </group>
-  <group name="Theming">
-    <entry key="Agenda Grid Highlight Color" type="Color">
-      <label>Highlight color</label>
-      <whatsthis>Select the highlight color here. The highlight color will be used for marking the currently selected area in your agenda and in the date navigator.</whatsthis>
-      <default>100, 100, 255</default>
-    </entry>
-  </group>
 </kcfg>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.