On 3/4/23 05:57, Sebastian Ramacher wrote:
On 2023-04-01 10:54:33 +1100, David Bannon wrote:
On 1/4/23 04:34, Sebastian Ramacher wrote:
Control: tags -1 moreinfo
On 2023-03-30 13:31:28 +1100, David Bannon wrote:
Package: release.debian.org
Severity: normal
User:release.debian....@packages.debian.org
Usertags: unblock
Please unblock package tomboy-ng v0.36a
I'd appreciate a -2 upload fixing the changelog. As 0.36 removes
features, users should know about that.
Hmm, yes, you are quite correct. The Tomdroid link has been removed and
that absolutely should be mentioned in the change log (users have been
warned for several releases and it was always 'experimental' but still ...)
I have now uploaded a -2 version to Mentors. Attached is the debdiff,
fortunately the changelog appears at the top ! You will see a much more
conventional progression of changes now.
https://mentors.debian.net/package/tomboy-ng/
And, obviously, no changes to other than the changelog !
I will notify my sponsor of this upload.
Thanks for your help at a busy time.
David
diff -Nru tomboy-ng-0.36/debian/changelog tomboy-ng-0.36a/debian/changelog
--- tomboy-ng-0.36/debian/changelog 2023-02-22 20:45:26.000000000 +1100
+++ tomboy-ng-0.36a/debian/changelog 2023-04-03 11:08:43.000000000 +1000
@@ -1,7 +1,23 @@
+tomboy-ng (0.36a-2) unstable; urgency=medium
+
+ * Repackage.
+ * Correct bad changelog.
+
+ -- David Bannon <tomboy...@bannons.id.au> Mon, 03 Apr 2023 11:08:43 +1000
+
+tomboy-ng (0.36a-1) unstable; urgency=medium
+
+ * Release of new version.
+ * More uniform colors when used with qt5ct.
+ * Man page added info re colors.
+ * Indicator that custom colors being used.
+ * Please see github for further change details.
+
+ -- David Bannon <tomboy...@bannons.id.au> Sun, 19 Mar 2023 10:08:23 +1100
+
tomboy-ng (0.36-1) unstable; urgency=medium
- * Release of new version
- * From 0.35 to 0.36 -
+ * Release of new version.
* New Feature export as PDF.
* New Feature insert a symbol or accented character.
* Bug fix in column mode of calculator.
@@ -11,7 +27,7 @@
* Can set colour of a link, more suitable default.
* Use of TextHint to better indicate EditSearch role.
* Revised note button colors for better dark theme use.
- * Please see github for further change details
+ * Please see github for further change details.
-- David Bannon <tomboy...@bannons.id.au> Wed, 22 Feb 2023 20:45:26 +1100
diff -Nru tomboy-ng-0.36/doc/tomboy-ng.1 tomboy-ng-0.36a/doc/tomboy-ng.1
--- tomboy-ng-0.36/doc/tomboy-ng.1 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/doc/tomboy-ng.1 2023-03-19 10:01:36.000000000 +1100
@@ -11,7 +11,7 @@
tomboy\-ng \- manage a collection of notes using a simple GUI markup
.SH SYNOPSIS
-tomboy\-ng [\-h \-\-help] [\-\-debug\-sync] [\-\-debug\-index]
[\-\-debug\-log=LOGFILE] [\-l \-\-lang=CC] [\-\-config\-dir=PATH_to_DIR] [\-o
PATH_to_NOTE] [\-\-open\-note=PATH_to_NOTE] [PATH_to_NOTE] [\-t
\-\-import\-txt=PATH_to_FILE] [\-m \-\-import\-md=PATH_to_FILE] [\-n
\-\-import\-note=PATH_to_NOTE] [\-\-title\-fname]
+tomboy\-ng [\-h \-\-help] [\-\-dark\-theme] [\-\-debug\-sync]
[\-\-debug\-index] [\-\-debug\-log=LOGFILE] [\-l \-\-lang=CC]
[\-\-config\-dir=PATH_to_DIR] [\-o PATH_to_NOTE] [\-\-open\-note=PATH_to_NOTE]
[PATH_to_NOTE] [\-t \-\-import\-txt=PATH_to_FILE] [\-m
\-\-import\-md=PATH_to_FILE] [\-n \-\-import\-note=PATH_to_NOTE]
[\-\-title\-fname]
.SH DESCRIPTION
tomboy\-ng is a rewrite of the much loved Tomboy Notes. It runs on Linux,
Windows and MacOS. It is file compatible with Tomdroid and GNote
(>=v0.30). Tomboy\-ng notes support Bold, Italic, Strikethrough, Highlight and
Underline in four sizes. It will sync notes with other systems using Tomboy's
File Sync model and to remote servers using sshfs. It will Sync with a Github
account, either all your notes or just ones in the SyncGithub notebook. You can
edit notes, from almost any device with a browser in markdown format.
@@ -24,6 +24,20 @@
While options below are familiar to Linux users, Mac and Windows users may
like to look at some examples further down to see how to use them.
+.SH DARK THEME
+The GTK2 version follows the system colour theme. However, the Qt5 version (eg
Bookworm and later) requires some instruction from the user. Using the
\-\-dark\-theme is simplest and probably the least satisfactory approach, the
note edit screen is a dark theme, other windows vary. A better Qt5 approach is
to set an environment variable that instructs the app to follow the existing
(generally gtk2) theme. You may need to install qt5\-style\-plugins package.
Either add the variable ahead of the tomboy\-ng command line like this \-
+
+QT_QPA_PLATFORMTHEME=gtk2 tomboy\-ng
+
+or, a more general solution, applying to all Qt5 apps, add that var to either
/etc/environment (requires root or, simpler in a .xsessionrc file in your home
dir.
+
+cd ; echo "export QT_QPA_PLATFORMTHEME=gtk2" >> .xsessionrc
+
+Probably need to log out and back in again. A more comprehensive approach is
to install the qt5ct package and give your Qt5 applications the same
environment variable as above but set to qt5ct (instead of gtk2). This will
allow you to choose one of the qt5ct colour themes or alter a copy with colours
of your choice. The qt5ct command has a nice GUI.
+
+On Windows, tomboy\-ng will follow the system for Dark Theme but only for the
note edit window. Using the \-\-dark\-theme switch is not recommended.
+
+On MacOS, tomboy\-ng is believed to follow the system theme.
.SH OPTIONS
.TP
@@ -35,6 +49,10 @@
Print the tomboy\-ng version and exit.
.TP
+\-\-dark\-theme
+Makes the note edit windows a reasonable dark theme (but you the system
theme). Other part of the app are not dark. This option may be removed in
future releases.
+
+.TP
\-\-no\-splash
Do not show the small tomboy\-ng splash screen at startup. However, if an
error is detected the splash screen is always shown.
diff -Nru tomboy-ng-0.36/package/version tomboy-ng-0.36a/package/version
--- tomboy-ng-0.36/package/version 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/package/version 2023-03-19 10:01:36.000000000 +1100
@@ -1 +1 @@
-0.36
+0.36a
diff -Nru tomboy-ng-0.36/po/tomboy-ng.es.po tomboy-ng-0.36a/po/tomboy-ng.es.po
--- tomboy-ng-0.36/po/tomboy-ng.es.po 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/po/tomboy-ng.es.po 2023-03-19 10:01:36.000000000 +1100
@@ -5,7 +5,7 @@
msgstr ""
"Project-Id-Version: tomboy-ng v0.35\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-13 10:56+0100\n"
+"PO-Revision-Date: 2023-03-16 16:59+0100\n"
"Last-Translator: RWR\n"
"Language-Team: \n"
"Language: es\n"
@@ -13,29 +13,29 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 3.2\n"
+"X-Generator: Poedit 3.2.2\n"
#: editbox.rsunabletoevaluate
msgid "Unable to find an expression to evaluate"
-msgstr "No encontró ninguna expresión para calcular"
+msgstr "No encuentra ninguna expresión para calcular"
#: fpttf.rsmissingfontfile
#, object-pascal-format
msgid "The font file <%s> can't be found."
-msgstr ""
+msgstr "No encuentra el archivo del fuente <%s>"
#: fpttf.rsnofontfilename
msgid "The FileName property is empty, so we can't load font data."
-msgstr ""
+msgstr "No podemos cargar la fuente porque la propiedad FileName es vacía."
#: fpttf.rsnosearchpathdefined
msgid "No search path was defined"
-msgstr ""
+msgstr "Falta la ruta de búsqueda"
#: fpttf.serrfontnotfound
#, object-pascal-format
msgid "The font <%s> can't be found"
-msgstr ""
+msgstr "No encuentra la fuente <%s>"
#: mainunit.rsabout
msgid "tomboy-ng notes - cross platform, sync and manage notes."
@@ -59,7 +59,7 @@
#: mainunit.rsfailedtoindex
msgid "Failed to index one or more notes."
-msgstr "tomboy-ng no pudo indizar una nota o más."
+msgstr "Fallo en indizar una nota o más."
#: resourcestr.rsaddnotestonotebook
msgid "Add notes to this Notebook"
@@ -170,7 +170,7 @@
#: resourcestr.rsenterhexvalue
msgctxt "resourcestr.rsenterhexvalue"
msgid "Enter the Hexadecimal value for a UTF8 character"
-msgstr ""
+msgstr "Escribe el valor hexidecimal para el carácter UTF8"
#: resourcestr.rsenternewnotebook
msgctxt "resourcestr.rsenternewnotebook"
@@ -251,7 +251,7 @@
#: resourcestr.rshelpdelay
msgctxt "resourcestr.rshelpdelay"
msgid "Delay startup 2 sec to allow OS to settle"
-msgstr "Retrasar arranque 2 segs para dejar asentarse el SO"
+msgstr "Retrasar el arranque 2 segs para dejar asentarse el SO"
#: resourcestr.rshelphelp
msgctxt "resourcestr.rshelphelp"
@@ -293,7 +293,7 @@
#: resourcestr.rshexcharrequired
msgid "2, 4, 6 or 8 Hex Characters Required"
-msgstr ""
+msgstr "Hacen falta 2, 4, 6 o 8 carácteres hexadecimal"
#: resourcestr.rslastchange
msgctxt "resourcestr.rslastchange"
@@ -435,7 +435,7 @@
#: resourcestr.rsrecoverok
msgctxt "resourcestr.rsrecoverok"
msgid "OK, File recovered."
-msgstr "Archivo recuperado."
+msgstr "OK, archivo recuperado."
#: resourcestr.rsrenamefailed
msgctxt "resourcestr.rsrenamefailed"
@@ -488,7 +488,7 @@
#: resourcestr.rssnapshotcreated
msgctxt "resourcestr.rssnapshotcreated"
msgid "created, do you want to copy it elsewhere ?"
-msgstr "creada. ¿Quiere copiarla en otro sitio?"
+msgstr "creada. ¿Quiere copiarla a otro sitio?"
#: resourcestr.rssyncerror
msgctxt "resourcestr.rssyncerror"
@@ -544,7 +544,7 @@
#: resourcestr.rsutf8charlist
msgid "Click here to browse to full list"
-msgstr ""
+msgstr "Haga clic aquí para ver la lista completa"
#: resourcestr.rswarnnossystray
msgid "WARNING, your Desktop might not display SysTray"
@@ -629,10 +629,10 @@
msgid "Downloads "
msgstr "Descargas"
-# ¿Editar las notas, la lista, cual?
+# ¿Revisar las notas, la lista, cual?
#: syncutils.rsedituploads
msgid "Edit Uploads "
-msgstr "Notas cambiadas a subir"
+msgstr "Revisar notas subidas"
#: syncutils.rslocaldeletes
msgid "Local Deletes "
@@ -660,7 +660,7 @@
# ¿Y el sujeto?
#: syncutils.rsnotrecommend
msgid "Generally not recommended."
-msgstr "En general, poco aconsejable"
+msgstr "En general, no aconsejable"
#: syncutils.rsremotedeletes
msgid "Remote Deletes "
@@ -675,9 +675,10 @@
msgid "Menu"
msgstr "Menú"
+# ¿Texto a traducir o un variabe?
#: teditboxform.editfind.text
msgid "EditFind"
-msgstr "Término"
+msgstr "RevisarBuscar"
#: teditboxform.label2.caption
msgid "Read Only"
@@ -762,7 +763,7 @@
#: teditboxform.menuitemexportpdf.caption
msgid "Export PDF"
-msgstr ""
+msgstr "Exportar PDF"
#: teditboxform.menuitemexportplaintext.caption
msgid "Export Plain Text"
@@ -859,7 +860,7 @@
#: teditboxform.speedrollback.hint
msgid "Roll Back"
-msgstr "Volver a la anterior"
+msgstr "Restaurar"
#: tformbackupview.buttondelete.caption
msgctxt "tformbackupview.buttondelete.caption"
@@ -922,9 +923,10 @@
msgid "Cancel"
msgstr "Cancelar"
+# Colores "por defecto", pero poco espacio en el botón
#: tformcolours.speeddefault.caption
msgid "Default"
-msgstr "Defecto"
+msgstr "Predets."
#: tformcolours.speedhighlight.caption
msgctxt "tformcolours.speedhighlight.caption"
@@ -933,7 +935,7 @@
#: tformcolours.speedlinks.caption
msgid "Links"
-msgstr ""
+msgstr "Enlaces"
#: tformcolours.speedok.caption
msgctxt "tformcolours.speedok.caption"
@@ -959,7 +961,7 @@
#: tformkmemo2pdf.caption
msgid "PDF Issues"
-msgstr ""
+msgstr "Problemas de PDF"
#: tformrecover.buttondeletebadnotes.caption
msgid "Delete Bad Notes"
@@ -1083,9 +1085,10 @@
msgid "Local"
msgstr "Local"
+# ¿Demasiado largo?
#: tformsdiff.buttallnewest.caption
msgid "Newest"
-msgstr "Más reciente"
+msgstr "La más reciente"
#: tformsdiff.buttalloldest.caption
msgid "Oldest"
@@ -1162,20 +1165,18 @@
#: tformsymbol.bitbtnrevert.caption
msgid "Revert"
-msgstr ""
+msgstr "Deshacer"
#: tformsymbol.caption
msgid "Symbol"
-msgstr ""
+msgstr "Símbolo"
#: tformsymbol.stringgrid1.columns[0].title.caption
-#, fuzzy
msgctxt "tformsymbol.stringgrid1.columns[0].title.caption"
msgid "Title"
msgstr "Título"
#: tformsymbol.stringgrid1.columns[1].title.caption
-#, fuzzy
msgctxt "tformsymbol.stringgrid1.columns[1].title.caption"
msgid "Title"
msgstr "Título"
@@ -1208,9 +1209,10 @@
msgid "Title"
msgstr "Título"
+# ¿Demasiado largo?
#: tformsync.listviewreport.columns[2].caption
msgid "Note ID"
-msgstr "ID nota"
+msgstr "ID de la nota"
#: tmainform.bitbtnhide.caption
msgid "Hide"
@@ -1232,15 +1234,16 @@
#: tmainform.caption
msgid "tomboy-ng"
-msgstr "Bienvenida a tomboy-ng"
+msgstr "tomboy-ng"
#: tmainform.checkboxdontshow.caption
msgid "Don't Show for normal startup"
msgstr "No mostrar al inicio"
+# Creo
#: tmainform.checkboxdontshow.hint
msgid "You can reverse this from Settings"
-msgstr "You can reverse this from Settings"
+msgstr "Puede invertirlo desde las Preferencias"
#: tmainform.hint
msgid "If the yellow tomboy-ng icon is visible in your System Tray, you can
dismiss this window."
@@ -1714,4 +1717,3 @@
msgctxt "tsett.tabsync.caption"
msgid "Sync"
msgstr "Sync"
-
diff -Nru tomboy-ng-0.36/po/tomboy-ng.fr.po tomboy-ng-0.36a/po/tomboy-ng.fr.po
--- tomboy-ng-0.36/po/tomboy-ng.fr.po 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/po/tomboy-ng.fr.po 2023-03-19 10:01:36.000000000 +1100
@@ -1320,6 +1320,12 @@
msgid "Set Notes"
msgstr "Définir Notes"
+#: tsearchform.bitbtnmenu.caption
+#, fuzzy
+msgctxt "tsearchform.bitbtnmenu.caption"
+msgid "Menu"
+msgstr "Menu"
+
#: tsearchform.buttonclearfilters.caption
#, fuzzy
#| msgid "Clear Filters"
@@ -1327,10 +1333,17 @@
msgid "Clear"
msgstr "Effacer les filtres"
-#: tsearchform.buttonmenu.caption
-msgctxt "tsearchform.buttonmenu.caption"
-msgid "Menu"
-msgstr "Menu"
+#: tsearchform.buttonclearsearch.caption
+#, fuzzy
+msgctxt "tsearchform.buttonclearsearch.caption"
+msgid "Clear"
+msgstr "Effacer"
+
+#: tsearchform.buttonsearchoptions.caption
+#, fuzzy
+msgctxt "tsearchform.buttonsearchoptions.caption"
+msgid "Options"
+msgstr "Options"
#: tsearchform.caption
msgid "tomboy-ng_Search"
@@ -1384,19 +1397,6 @@
msgid "Notebooks"
msgstr "Carnets"
-#: tsearchform.speedbuttonclearsearch.caption
-msgctxt "tsearchform.speedbuttonclearsearch.caption"
-msgid "Clear"
-msgstr "Effacer"
-
-#: tsearchform.speedsearchotions.caption
-msgid "Options"
-msgstr "Options"
-
-#: tsearchform.speedsearchotions.hint
-msgid "Search Options"
-msgstr "Options de recherche"
-
#: tsett.buttdefaultnotedir.caption
msgid "Use Default Notes Location"
msgstr "Emplacement par défaut"
diff -Nru tomboy-ng-0.36/po/tomboy-ng.nl.po tomboy-ng-0.36a/po/tomboy-ng.nl.po
--- tomboy-ng-0.36/po/tomboy-ng.nl.po 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/po/tomboy-ng.nl.po 2023-03-19 10:01:36.000000000 +1100
@@ -1298,15 +1298,28 @@
msgid "Set Notes"
msgstr "Notities instellen"
+#: tsearchform.bitbtnmenu.caption
+#, fuzzy
+msgctxt "tsearchform.bitbtnmenu.caption"
+msgid "Menu"
+msgstr "Menu"
+
#: tsearchform.buttonclearfilters.caption
msgctxt "tsearchform.buttonclearfilters.caption"
msgid "Clear"
msgstr "Wissen"
-#: tsearchform.buttonmenu.caption
-msgctxt "tsearchform.buttonmenu.caption"
-msgid "Menu"
-msgstr "Menu"
+#: tsearchform.buttonclearsearch.caption
+#, fuzzy
+msgctxt "tsearchform.buttonclearsearch.caption"
+msgid "Clear"
+msgstr "Wissen"
+
+#: tsearchform.buttonsearchoptions.caption
+#, fuzzy
+msgctxt "tsearchform.buttonsearchoptions.caption"
+msgid "Options"
+msgstr "Opties"
#: tsearchform.caption
msgid "tomboy-ng_Search"
@@ -1358,19 +1371,6 @@
msgid "Notebooks"
msgstr "Notitieboeken"
-#: tsearchform.speedbuttonclearsearch.caption
-msgctxt "tsearchform.speedbuttonclearsearch.caption"
-msgid "Clear"
-msgstr "Wissen"
-
-#: tsearchform.speedsearchotions.caption
-msgid "Options"
-msgstr "Opties"
-
-#: tsearchform.speedsearchotions.hint
-msgid "Search Options"
-msgstr "Zoekopties"
-
#: tsett.buttdefaultnotedir.caption
msgid "Use Default Notes Location"
msgstr "Standaard notitielocatie gebruiken"
diff -Nru tomboy-ng-0.36/po/tomboy-ng.pot tomboy-ng-0.36a/po/tomboy-ng.pot
--- tomboy-ng-0.36/po/tomboy-ng.pot 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/po/tomboy-ng.pot 2023-03-19 10:01:36.000000000 +1100
@@ -1280,14 +1280,24 @@
msgid "Set Notes"
msgstr ""
+#: tsearchform.bitbtnmenu.caption
+msgctxt "tsearchform.bitbtnmenu.caption"
+msgid "Menu"
+msgstr ""
+
#: tsearchform.buttonclearfilters.caption
msgctxt "tsearchform.buttonclearfilters.caption"
msgid "Clear"
msgstr ""
-#: tsearchform.buttonmenu.caption
-msgctxt "tsearchform.buttonmenu.caption"
-msgid "Menu"
+#: tsearchform.buttonclearsearch.caption
+msgctxt "tsearchform.buttonclearsearch.caption"
+msgid "Clear"
+msgstr ""
+
+#: tsearchform.buttonsearchoptions.caption
+msgctxt "tsearchform.buttonsearchoptions.caption"
+msgid "Options"
msgstr ""
#: tsearchform.caption
@@ -1340,19 +1350,6 @@
msgid "Notebooks"
msgstr ""
-#: tsearchform.speedbuttonclearsearch.caption
-msgctxt "tsearchform.speedbuttonclearsearch.caption"
-msgid "Clear"
-msgstr ""
-
-#: tsearchform.speedsearchotions.caption
-msgid "Options"
-msgstr ""
-
-#: tsearchform.speedsearchotions.hint
-msgid "Search Options"
-msgstr ""
-
#: tsett.buttdefaultnotedir.caption
msgid "Use Default Notes Location"
msgstr ""
diff -Nru tomboy-ng-0.36/po/tomboy-ng.uk.po tomboy-ng-0.36a/po/tomboy-ng.uk.po
--- tomboy-ng-0.36/po/tomboy-ng.uk.po 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/po/tomboy-ng.uk.po 2023-03-19 10:01:36.000000000 +1100
@@ -1297,15 +1297,28 @@
msgid "Set Notes"
msgstr "Вказати нотатки"
+#: tsearchform.bitbtnmenu.caption
+#, fuzzy
+msgctxt "tsearchform.bitbtnmenu.caption"
+msgid "Menu"
+msgstr "Меню"
+
#: tsearchform.buttonclearfilters.caption
msgctxt "tsearchform.buttonclearfilters.caption"
msgid "Clear"
msgstr "Очистити"
-#: tsearchform.buttonmenu.caption
-msgctxt "tsearchform.buttonmenu.caption"
-msgid "Menu"
-msgstr "Меню"
+#: tsearchform.buttonclearsearch.caption
+#, fuzzy
+msgctxt "tsearchform.buttonclearsearch.caption"
+msgid "Clear"
+msgstr "Очистити"
+
+#: tsearchform.buttonsearchoptions.caption
+#, fuzzy
+msgctxt "tsearchform.buttonsearchoptions.caption"
+msgid "Options"
+msgstr "Параметри"
#: tsearchform.caption
msgid "tomboy-ng_Search"
@@ -1357,19 +1370,6 @@
msgid "Notebooks"
msgstr "Записники"
-#: tsearchform.speedbuttonclearsearch.caption
-msgctxt "tsearchform.speedbuttonclearsearch.caption"
-msgid "Clear"
-msgstr "Очистити"
-
-#: tsearchform.speedsearchotions.caption
-msgid "Options"
-msgstr "Параметри"
-
-#: tsearchform.speedsearchotions.hint
-msgid "Search Options"
-msgstr "Параметри пошуку"
-
#: tsett.buttdefaultnotedir.caption
msgid "Use Default Notes Location"
msgstr "Викор. типове розташування нотаток"
diff -Nru tomboy-ng-0.36/prepare.md tomboy-ng-0.36a/prepare.md
--- tomboy-ng-0.36/prepare.md 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/prepare.md 2023-03-19 10:01:36.000000000 +1100
@@ -58,6 +58,9 @@
cd ../"Build""$DebVer"
dput mentors *.changes
+Find it at -
+ https://mentors.debian.net/package/tomboy-ng/
+
If you don't get a response, did you include 'mentors' in the dput line ?
***REMEMBER to feed changlog back to github tree !***
diff -Nru tomboy-ng-0.36/scripts/prepare.debian
tomboy-ng-0.36a/scripts/prepare.debian
--- tomboy-ng-0.36/scripts/prepare.debian 2023-02-22 20:42:59.000000000
+1100
+++ tomboy-ng-0.36a/scripts/prepare.debian 2023-03-19 10:01:36.000000000
+1100
@@ -376,14 +376,14 @@
cd "$APP"_"$VER""$DEBVER"
- dch -v "$VER""$DEBVER" -D"$DISTRO1" "$DISTRO2" "Release of new version"
+ dch -v "$VER""$DEBVER" -D"$DISTRO1" "$DISTRO2" "Release of new
version."
if [ -f whatsnew ]; then
echo "---------- Including whatsnew in changelog"
while IFS= read -r Line; do
dch --append "$Line"
done < whatsnew
fi
- dch --append "Please see github for further change details"
+ dch --append "Please see github for further change details."
#cp debian/control.debian debian/control # thats
the GTK2 version
#if [ "$WIDGET" = "Qt5" ]; then
diff -Nru tomboy-ng-0.36/source/cli.pas tomboy-ng-0.36a/source/cli.pas
--- tomboy-ng-0.36/source/cli.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/cli.pas 2023-03-19 10:01:36.000000000 +1100
@@ -81,7 +81,7 @@
debugln(rsMachelp1);
debugln(rsMacHelp2);
{$endif}
- debugln(' --dark-theme');
+ debugln(' --dark-theme ' + 'Does not work for GTK2');
debugln(' -l --lang=CCode ' + rsHelpLang); // syntax
depends on bugfix https://bugs.freepascal.org/view.php?id=35432
debugln(' -h --help ' + rsHelpHelp);
debugln(' --version ' + rsHelpVersion);
diff -Nru tomboy-ng-0.36/source/editbox.lfm tomboy-ng-0.36a/source/editbox.lfm
--- tomboy-ng-0.36/source/editbox.lfm 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/editbox.lfm 2023-03-19 10:01:36.000000000 +1100
@@ -14,7 +14,7 @@
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object PanelReadOnly: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = KMemo1
diff -Nru tomboy-ng-0.36/source/editbox.pas tomboy-ng-0.36a/source/editbox.pas
--- tomboy-ng-0.36/source/editbox.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/editbox.pas 2023-03-19 10:01:36.000000000 +1100
@@ -235,6 +235,9 @@
we can be sure the note has been added to NoteLister first.
2023/02/12 Set the default font name from Sett in OnShow(), issue #263
2023/02/14 Fixed bug in column calculater, was ignoring negitive terms.
+ 2023/03/11 Allow Qt to set Text and Background colour, force Gray for
Inactive
+ background (in LoadNote) cos Kmemo get it wrong
+
}
@@ -465,6 +468,7 @@
// The thread keeps going after the method
returns doing above and then
// free-ing the List.
function SaveStringList(const SL: TStringList; Loc: TNoteUpdateRec):
boolean;
+ procedure SetTheColors;
function SimpleCalculate(out AStr: string): boolean;
procedure ClearLinks(const StartScan : longint =0; EndScan :
longint = 0);
{ Looks around current block looking for link
blocks. If invalid, 'unlinks' them.
@@ -1967,6 +1971,27 @@
- Existing Note from eg Tray Menu, Searchbox yes yes
no R1
ImportNote()
}
+
+
+procedure TEditBoxForm.SetTheColors;
+begin
+ KMemo1.Blocks.LockUpdate;
+ {$ifdef windows}
+ // Color:= Sett.textcolour;
+ if Sett.DarkTheme then Color := Sett.BackGndColour;
+ {$endif}
+ PanelFind.Color := Sett.AltColour;
+ Panel1.Color := Sett.AltColour;
+ KMemo1.Colors.SelTextFocused := Sett.TextColour;
+ KMemo1.Colors.SelText := Sett.TextColour; // when looses focus
+ KMemo1.Colors.BkGnd:= Sett.BackGndColour;
+ KMemo1.Colors.SelBkGnd := Sett.AltBackGndColor; // Selected backgnd
when looses focus
+ KMemo1.Colors.SelBkGndFocused := Sett.AltBackGndColor; // Selected backgnd
with focus
+ Kmemo1.Blocks.DefaultTextStyle.Font.Color := Sett.TextColour;
+ Kmemo1.Blocks.DefaultTextStyle.Brush.Color := Sett.BackGndColour;
+ KMemo1.Blocks.UnLockUpdate;
+end;
+
procedure TEditBoxForm.FormShow(Sender: TObject);
var
ItsANewNote : boolean = false;
@@ -1977,6 +2002,7 @@
TimerSave.Enabled := False;
KMemo1.Font.Size := Sett.FontNormal;
KMemo1.Font.Name := Sett.UsualFont;
+// KMemo1.Colors.SelBkGnd := Sett.BackGndColour;
{$ifdef LCLGTK2}
KMemo1.ExecuteCommand(ecPaste); // this to deal with a "first copy"
issue on Linux.
// above line generates a gtk2 assertion but only in single note mode. I
suspect
@@ -1985,6 +2011,9 @@
// as we select some text so may as well get it over with. No need to do
it in Qt5, Win, Mac
{$endif}
Kmemo1.Clear;
+// SetTheColors;
+
+
if SingleNoteMode then
ItsANewNote := LoadSingleNote() // Might not be Tomboy XML
format
else
@@ -2022,17 +2051,7 @@
KMemo1.executecommand(ecEditorTop);
KMemo1.ExecuteCommand(ecDown);
end;
- KMemo1.Blocks.LockUpdate;
- {$ifdef windows}
- // Color:= Sett.textcolour;
- if Sett.DarkTheme then Color := Sett.BackGndColour;
- {$endif}
- PanelFind.Color := Sett.AltColour;
- Panel1.Color := Sett.AltColour;
- KMemo1.Colors.BkGnd:= Sett.BackGndColour;
- Kmemo1.Blocks.DefaultTextStyle.Font.Color := Sett.TextColour;
- Kmemo1.Blocks.DefaultTextStyle.Brush.Color := Sett.BackGndColour;
- KMemo1.Blocks.UnLockUpdate;
+ SetTheColors;
Ready := true;
Dirty := False;
end;
diff -Nru tomboy-ng-0.36/source/kmemo2pdf.lfm
tomboy-ng-0.36a/source/kmemo2pdf.lfm
--- tomboy-ng-0.36/source/kmemo2pdf.lfm 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/kmemo2pdf.lfm 2023-03-19 10:01:36.000000000
+1100
@@ -1,7 +1,7 @@
object FormKMemo2pdf: TFormKMemo2pdf
- Left = 143
+ Left = 80
Height = 461
- Top = 213
+ Top = 570
Width = 571
ActiveControl = Memo1
Caption = 'PDF Issues'
@@ -9,7 +9,7 @@
ClientWidth = 571
OnCreate = FormCreate
OnShow = FormShow
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object BitBtn1: TBitBtn
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
diff -Nru tomboy-ng-0.36/source/loadnote.pas tomboy-ng-0.36a/source/loadnote.pas
--- tomboy-ng-0.36/source/loadnote.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/loadnote.pas 2023-03-19 10:01:36.000000000 +1100
@@ -1,5 +1,5 @@
unit LoadNote;
-{ Copyright (C) 2017-2022 David Bannon
+{ Copyright (C) 2017-2023 David Bannon
License:
This code is licensed under BSD 3-Clause Clear License, see file
License.txt
@@ -7,7 +7,7 @@
------------------
- This unit is responsible for loading a note into the passed Richmemo. The
+ This unit is responsible for loading a note into the passed Kmemo. The
note is expected to be in Tomboy's XML format.
Note that the class expects a few things to be passed to it, after
creation
that it will need before you call LoadNote().
@@ -35,6 +35,7 @@
2021/08/27 Extensive changes to support multilevel bullets, use Tomboy or
Conboy model
2022/10/31 Force default background colour while loading, it shows up ok
without
doing it here but blocks do not always report the correct
color when asked.
+ 2023/03/11 Allow Qt to set Text and Background colour, force Gray for
Inactive Background cos Kmemo get it wrong
}
{$mode objfpc}{$H+}
@@ -42,7 +43,7 @@
interface
uses
- Classes, SysUtils, KMemo;
+ Classes, SysUtils, KMemo, Graphics;
type
@@ -103,7 +104,7 @@
implementation
-uses Graphics, // For some font style defs
+uses // For some font style defs
LazUTF8,
Settings, // User settings and some defines across units.
TB_Utils,
@@ -168,7 +169,7 @@
FT.Size:= FontSize;
end;
TB := KM.Blocks.AddTextBlock(RestoreBadXMLChar(InStr));
- TB.TextStyle.Brush.Color := Sett.BackGndColour;
+ TB.TextStyle.Brush.Color := Sett.BackGndColour; //LocalBackGndColour;
if Bold then FT.Style := FT.Style + [fsBold];
if Italic then FT.Style := FT.Style + [fsItalic];
if HighLight then TB.TextStyle.Brush.Color := Sett.HiColour;
@@ -178,7 +179,7 @@
if FixedWidth then FT.Pitch := fpFixed;
if not FixedWidth then FT.Name := Sett.UsualFont; // Because
'FixedWidth := false;' does not specify a font to return to
// if Sett.DarkTheme then Ft.Color:=Sett.DarkTextColour;
- Ft.Color:=Sett.TextColour;
+ Ft.Color := Sett.TextColour;
TB.TextStyle.Font := Ft;
FT.Free;
end;
diff -Nru tomboy-ng-0.36/source/mainunit.lfm tomboy-ng-0.36a/source/mainunit.lfm
--- tomboy-ng-0.36/source/mainunit.lfm 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/mainunit.lfm 2023-03-19 10:01:36.000000000 +1100
@@ -1,8 +1,8 @@
object MainForm: TMainForm
- Left = 195
+ Left = 452
Height = 294
Hint = 'If the yellow tomboy-ng icon is visible in your System Tray, you can
dismiss this window.'
- Top = 208
+ Top = 303
Width = 565
Caption = 'tomboy-ng'
ClientHeight = 294
@@ -13,7 +13,7 @@
OnKeyDown = FormKeyDown
OnResize = FormResize
OnShow = FormShow
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object ImageNotesDirTick: TImage
AnchorSideTop.Control = LabelNotesFound
Left = 24
diff -Nru tomboy-ng-0.36/source/mainunit.pas tomboy-ng-0.36a/source/mainunit.pas
--- tomboy-ng-0.36/source/mainunit.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/mainunit.pas 2023-03-19 10:01:36.000000000 +1100
@@ -78,6 +78,7 @@
2022/08/10 Added an about Lazarus to splash screen and simplified the
About screen.
2022/10/20 To Avoid calling IndexNotes() from Import, now function,
IndexNewNote()
2022/11/14 ShowNotifications() now cross platform.
+ 2023/03/17 Provide better support for dark theme, particularly for Qt5 in
qt5ct mode
CommandLine Switches
@@ -182,6 +183,8 @@
procedure StartIPCServer();
procedure CommMessageReceived(Sender: TObject);
+ // Attempt to detect we are in a dark theme, sets relevent colours, if
main form
+ // is dark, then rest of app will be too except for the KMemo.
procedure TestDarkThemeInUse();
{$ifdef LINUX}
function CheckGnomeExtras(): boolean;
@@ -544,24 +547,32 @@
end;
{$endif} // hides CheckForSystemTray() and
CheckGnomeExtras() from non Linux
+
+
procedure TMainForm.FormShow(Sender: TObject);
var
NoteID, NoteTitle : string;
- {$ifndef LCLGTK2}Lab : TLabel; {$endif}
+(* {$ifndef LCLGTK2} {$endif} *) Lab : TLabel; Butt : TBitBtn;
begin
TestDarkThemeInUse();
- {$ifndef LCLGTK2} // GTK2 seems only one we can be sure is
auto colours !
+// {$ifndef LCLGTK2} // GTK2 seems only one we can be sure is
auto colours !
// We honour --dark-theme for most and if we can guess its dark we'll
// act accordingly.
- color := Sett.AltColour;
- font.color := Sett.TextColour; // These do not work for
Windows, so for just bullseye, just temp....
- ButtMenu.Color := Sett.AltColour;
- BitBtnQuit.Color := Sett.AltColour;
- BitBtnHide.Color := Sett.AltColour;
- for Lab in [Label5, LabelNotesFound, Label3, Label4,
LabelBadNoteAdvice, LabelError] do
- TLabel(Lab).Font.Color:= Sett.TextColour;
- CheckBoxDontShow.Font.color := Sett.TextColour;
- {$endif}
+
+ if Sett.DarkThemeSwitch then begin // If Qt is doing its own
colours, let it !
+ color := Sett.AltColour;
+ font.color := Sett.TextColour; // These do not work
for Windows ?
+ for Butt in [ButtMenu, BitBtnQuit, BitBtnHide, ButtSysTrayHelp] do
+ Butt.Color := Sett.AltColour;
+ //ButtMenu.Color := Sett.AltColour;
+ //BitBtnQuit.Color := Sett.AltColour;
+ //BitBtnHide.Color := Sett.AltColour;
+ // ButtSysTrayHelp.Color := Sett.AltColour;
+ for Lab in [Label5, LabelNotesFound, Label3, Label4,
LabelBadNoteAdvice, LabelError] do
+ TLabel(Lab).Font.Color:= Sett.TextColour;
+ CheckBoxDontShow.Font.color := Sett.TextColour;
+ end;
+// {$endif}
if SingleNoteFileName() <> '' then begin // That reads the global in
CLI Unit
SingleNoteMode(SingleNoteFileName);
exit;
@@ -691,7 +702,7 @@
ButtSysTrayHelp.width := MN;
end;
- // Attempt to detect we are in a dark theme, sets relevent colours.
+
procedure TMainForm.TestDarkThemeInUse();
{$ifdef WINDOWS} function WinDarkTheme : boolean; // we also need to
test in High Contrast mode, its not a colour theme.
@@ -721,10 +732,11 @@
{$endif}
begin
- if Application.HasOption('dark-theme') then // Manual override always wins
!
- Sett.DarkTheme := True
+ if Application.HasOption('dark-theme') then // Manual override always wins
unless its GTK2 (GTK3 ?) !
+ {$ifndef LCLGTK2} Sett.DarkThemeSwitch := True {$endif}
else begin
Sett.DarkTheme := false;
+ Sett.DarkThemeSwitch := false;
{$ifdef WINDOWS}
Sett.DarkTheme := WinDarkTheme();
{$else}
@@ -733,7 +745,7 @@
Sett.DarkTheme := (Col[3] < 'A') and (Col[5] < 'A') and (Col[7] < 'A');
{$endif}
end;
- Sett.SetColours;
+ Sett.SetColours;
end;
{ ------------- M E N U M E T H O D S ----------------}
diff -Nru tomboy-ng-0.36/source/searchunit.lfm
tomboy-ng-0.36a/source/searchunit.lfm
--- tomboy-ng-0.36/source/searchunit.lfm 2023-02-22 20:42:59.000000000
+1100
+++ tomboy-ng-0.36a/source/searchunit.lfm 2023-03-19 10:01:36.000000000
+1100
@@ -16,17 +16,16 @@
OnKeyDown = FormKeyDown
OnResize = FormResize
OnShow = FormShow
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object EditSearch: TEdit
- AnchorSideLeft.Control = ButtonMenu
+ AnchorSideLeft.Control = BitBtnMenu
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
- AnchorSideBottom.Control = ButtonMenu
AnchorSideBottom.Side = asrBottom
- Left = 126
+ Left = 142
Height = 32
Top = 0
- Width = 222
+ Width = 148
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 2
OnChange = EditSearchChange
@@ -39,7 +38,6 @@
end
object Panel1: TPanel
AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = ButtonMenu
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
@@ -162,16 +160,39 @@
OnKeyPress = ListViewNotesKeyPress
end
end
- object ButtonMenu: TSpeedButton
+ object StatusBar1: TStatusBar
+ Left = 0
+ Height = 23
+ Top = 378
+ Width = 824
+ Panels = <>
+ end
+ object ButtonClearSearch: TButton
+ AnchorSideLeft.Control = EditSearch
+ AnchorSideLeft.Side = asrBottom
+ AnchorSideTop.Control = Owner
+ AnchorSideBottom.Control = EditSearch
+ AnchorSideBottom.Side = asrBottom
+ Left = 292
+ Height = 32
+ Top = 0
+ Width = 99
+ Anchors = [akTop, akLeft, akBottom]
+ BorderSpacing.Left = 2
+ Caption = 'Clear'
+ OnClick = ButtonClearSearchClick
+ TabOrder = 3
+ end
+ object BitBtnMenu: TBitBtn
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
+ AnchorSideBottom.Control = EditSearch
AnchorSideBottom.Side = asrBottom
- Left = 3
+ Left = 0
Height = 32
Top = 0
- Width = 120
- BorderSpacing.Left = 3
- BorderSpacing.Right = 3
+ Width = 140
+ Anchors = [akTop, akLeft, akBottom]
Caption = 'Menu'
Glyph.Data = {
36090000424D3609000000000000360000002800000018000000180000000100
@@ -249,47 +270,23 @@
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
- OnClick = ButtonMenuClick
+ OnClick = BitBtnMenuClick
+ TabOrder = 4
end
- object StatusBar1: TStatusBar
- Left = 0
- Height = 23
- Top = 378
- Width = 824
- Panels = <>
- end
- object SpeedSearchOtions: TSpeedButton
- AnchorSideTop.Control = EditSearch
+ object ButtonSearchOptions: TButton
+ AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
- AnchorSideBottom.Control = ButtonMenu
+ AnchorSideBottom.Control = EditSearch
AnchorSideBottom.Side = asrBottom
- Left = 699
+ Left = 680
Height = 32
- Hint = 'Search Options'
Top = 0
- Width = 120
- Anchors = [akTop, akRight, akBottom]
- BorderSpacing.Right = 5
+ Width = 144
+ Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'Options'
- OnClick = SpeedSearchOtionsClick
- ShowHint = True
- ParentShowHint = False
- PopupMenu = PopupMenuSearchOptions
- end
- object SpeedButtonClearSearch: TSpeedButton
- AnchorSideLeft.Control = EditSearch
- AnchorSideLeft.Side = asrBottom
- AnchorSideTop.Control = EditSearch
- AnchorSideBottom.Control = ButtonMenu
- AnchorSideBottom.Side = asrBottom
- Left = 348
- Height = 32
- Top = 0
- Width = 120
- Anchors = [akTop, akLeft, akBottom]
- Caption = 'Clear'
- OnClick = SpeedButtonClearSearchClick
+ OnClick = ButtonSearchOptionsClick
+ TabOrder = 5
end
object SelectDirectoryDialog1: TSelectDirectoryDialog
Left = 344
diff -Nru tomboy-ng-0.36/source/searchunit.lrj
tomboy-ng-0.36a/source/searchunit.lrj
--- tomboy-ng-0.36/source/searchunit.lrj 2023-02-22 20:42:59.000000000
+1100
+++ tomboy-ng-0.36a/source/searchunit.lrj 2023-03-19 10:01:36.000000000
+1100
@@ -4,10 +4,9 @@
{"hash":4860802,"name":"tsearchform.buttonclearfilters.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"},
{"hash":78352483,"name":"tsearchform.listboxnotebooks.hint","sourcebytes":[82,105,103,104,116,32,67,108,105,99,107,32,116,111,32,109,97,110,97,103,101,32,78,111,116,101,98,111,111,107,115],"value":"Right
Click to manage Notebooks"},
{"hash":179900739,"name":"tsearchform.panel2.caption","sourcebytes":[78,111,116,101,98,111,111,107,115],"value":"Notebooks"},
-{"hash":343125,"name":"tsearchform.buttonmenu.caption","sourcebytes":[77,101,110,117],"value":"Menu"},
-{"hash":233995187,"name":"tsearchform.speedsearchotions.hint","sourcebytes":[83,101,97,114,99,104,32,79,112,116,105,111,110,115],"value":"Search
Options"},
-{"hash":108725763,"name":"tsearchform.speedsearchotions.caption","sourcebytes":[79,112,116,105,111,110,115],"value":"Options"},
-{"hash":4860802,"name":"tsearchform.speedbuttonclearsearch.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"},
+{"hash":4860802,"name":"tsearchform.buttonclearsearch.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"},
+{"hash":343125,"name":"tsearchform.bitbtnmenu.caption","sourcebytes":[77,101,110,117],"value":"Menu"},
+{"hash":108725763,"name":"tsearchform.buttonsearchoptions.caption","sourcebytes":[79,112,116,105,111,110,115],"value":"Options"},
{"hash":89337013,"name":"tsearchform.menueditnotebooktemplate.caption","sourcebytes":[69,100,105,116,32,78,111,116,101,98,111,111,107,32,84,101,109,112,108,97,116,101],"value":"Edit
Notebook Template"},
{"hash":73518027,"name":"tsearchform.menudeletenotebook.caption","sourcebytes":[68,101,108,101,116,101,32,78,111,116,101,98,111,111,107],"value":"Delete
Notebook"},
{"hash":36354507,"name":"tsearchform.menurenamenotebook.caption","sourcebytes":[82,101,110,97,109,101,32,78,111,116,101,66,111,111,107],"value":"Rename
NoteBook"},
diff -Nru tomboy-ng-0.36/source/searchunit.pas
tomboy-ng-0.36a/source/searchunit.pas
--- tomboy-ng-0.36/source/searchunit.pas 2023-02-22 20:42:59.000000000
+1100
+++ tomboy-ng-0.36a/source/searchunit.pas 2023-03-19 10:01:36.000000000
+1100
@@ -23,7 +23,7 @@
current title list.
20171005 - Added an ifdef Darwin to RecentNotes() to address a OSX bug
that prevented
the recent file names being updated.
- 2017/10/10 - added a refresh button, need to make it auto but need to
look at
+ 2017/10/10 - added a refresh ButtonSMenu, need to make it auto but need
to look at
timing implication for people with very big note sets first.
2017/10/10 - added the ability to update the stringlist when a new note
is
@@ -33,7 +33,7 @@
2017/11/07 - switched over to using NoteLister, need to remove a lot of
unused code.
2017/11/28 - fixed a bug I introduced while restructuring OpenNote to
better
- handle a note being auto saved. This bug killed the Link button in
EditNote
+ handle a note being auto saved. This bug killed the Link ButtonSMenu in
EditNote
2017/11/29 - check to see if NoteLister is still valid before passing
on updates to a Note's status. If we are quiting, it may not be.
2017/12/03 Added code to clear Search box when it gets focus. Issue #9
@@ -71,11 +71,11 @@
2018/12/29 Small improvements in time to save a file.
2019/02/01 OpenNote() now assignes a new note to the notebook if one is
open (ie ButtonNotebookOptions is enabled)
2019/02/09 Move autosize stringgrid1 (back?) into UseList()
- 2019/02/16 Clear button now calls UseList() to ensure autosize happens.
+ 2019/02/16 Clear ButtonSMenu now calls UseList() to ensure autosize
happens.
2019/03/13 Now pass editbox the searchterm (if any) so it can move cursor
to first occurance in note
2019/04/07 Restructured Main and Popup menus. Untested Win/Mac.
2019/04/13 Don't call note_lister.GetNotes more than absolutly necessary.
- 2019/04/15 One Clear Filters button to replace Clea and Show All Notes.
Checkboxes Mode instead of menu
+ 2019/04/15 One Clear Filters ButtonSMenu to replace Clea and Show All
Notes. Checkboxes Mode instead of menu
2019/04/16 Fixed resizing atifacts on stringGrids by turning off 'Flat'
property, Linux !
2019/08/18 Removed AnyCombo and CaseSensitive checkboxes and replaced
with SearchOptionsMenu, easier translations
2019/11/19 When reshowing an open note, bring it to current workspace,
Linux only. Test on Wayland !
@@ -88,7 +88,7 @@
Better ctrl of Search Term highlight (but still highlit when
makeing form re-visible).
Drop Create Date and Filename from Search results string grid.
But I still cannot control the little green triangles in
stringgrid headings indicating sort.
- 2020/02/01 Do not refresh the string grids automatically, turn on the
refresh button for user to do it.
+ 2020/02/01 Do not refresh the string grids automatically, turn on the
refresh ButtonSMenu for user to do it.
2020/02/19 hilight selected notebook name.
2020/03/09 Make sure 'x' (put in by a bug) is not a valid sync repo path.
2020/05/10 Faster search
@@ -121,6 +121,7 @@
2022/12/31 EditSearch now uses TestHint.
2023/01/11 Qt5 - ListViewNotesKeyPress now forces keypress to EditSearch
2023/01/11 Added Windows to above, BUT Mac cannot do this. So, disable on
Mac.
+ 2023/03/17 Darken up Search Window in dark theme.
}
{$mode objfpc}{$H+}
@@ -142,6 +143,9 @@
type { TSearchForm }
TSearchForm = class(TForm)
+ BitBtnMenu: TBitBtn;
+ ButtonSearchOptions: TButton;
+ ButtonClearSearch: TButton;
ButtonClearFilters: TButton;
EditSearch: TEdit;
ListBoxNotebooks: TListBox;
@@ -161,12 +165,11 @@
Panel2: TPanel;
PopupMenuSearchOptions: TPopupMenu;
PopupMenuNotebook: TPopupMenu;
- ButtonMenu: TSpeedButton;
- SpeedButtonClearSearch: TSpeedButton;
- SpeedSearchOtions: TSpeedButton;
Splitter1: TSplitter;
StatusBar1: TStatusBar;
SelectDirectoryDialog1: TSelectDirectoryDialog;
+ procedure BitBtnMenuClick(Sender: TObject);
+ procedure ButtonClearSearchClick(Sender: TObject);
procedure ButtonMenuClick(Sender: TObject);
{ If a search is underway, searches.
Else, if we have
an active notebook filter applied,
reapply it. Failing
@@ -177,6 +180,8 @@
//procedure EditSearchExit(Sender: TObject);
procedure ButtonClearFiltersClick(Sender: TObject);
+ procedure ButtonSearchOptionsClick(Sender: TObject);
+ procedure ButtonSMenuClick(Sender: TObject);
procedure EditSearchChange(Sender: TObject);
procedure EditSearchEnter(Sender: TObject);
procedure EditSearchKeyUp(Sender: TObject; var Key: Word; Shift:
TShiftState);
@@ -192,7 +197,7 @@
procedure FormShow(Sender: TObject);
procedure ListBoxNotebooksClick(Sender: TObject);
procedure ListBoxNotebooksMouseUp(Sender: TObject;
- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+ ButtonSMenu: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure ListViewNotesColumnClick(Sender: TObject; Column: TListColumn
);
procedure ListViewNotesData(Sender: TObject; Item: TListItem);
@@ -217,8 +222,6 @@
other downloded note ID. Adjusts Note_Lister according and marks any
note that is currently open as read only. Does not move files
around. }
procedure ProcessSyncUpdates(const DeletedList, DownList: TStringList);
- procedure SpeedButtonClearSearchClick(Sender: TObject);
- procedure SpeedSearchOtionsClick(Sender: TObject);
// A proc that is called when a note is added to repo by, eg,
an import.
// The procedure's address is passed, via tb_utils, to the CLI
unit so it
// knows to call this direct if its not nil.
@@ -255,7 +258,7 @@
procedure MenuListBuilder(MList: TList);
procedure RecentMenuClicked(Sender: TObject);
// Gets called to refresh the ListViewNotes in
cases were we may not do it immediatly
- // If ImmediateRefresh, we use the previously
recorded NumbToRefresh and clear Button
+ // If ImmediateRefresh, we use the previously
recorded NumbToRefresh and clear ButtonSMenu
// Else re do a new search or clear depending
on existing search parameters.
procedure IndexAndRefresh(DisplayOnly: boolean = false);
function RemoveFromHelpList(const FullHelpNoteFileName: string):
boolean;
@@ -308,9 +311,9 @@
//function IsThisaTitle(const Term: ANSIString): boolean;
{ Gets called with a title and filename (clicking
grid), with just a title
- (clicked a note link or recent menu item or Link
Button) or nothing
+ (clicked a note link or recent menu item or Link
ButtonSMenu) or nothing
(new note). If its just Title but Title does not
exist, its Link
- Button. DontBackUp says do not make a backup as we
opne because we are in
+ ButtonSMenu. DontBackUp says do not make a backup
as we opne because we are in
a Roll Back Cycle.}
procedure OpenNote(NoteTitle: String; FullFileName: string = '';
TemplateIs: AnsiString =
''; BackUp: boolean = True; InSearch : boolean = false) ;
@@ -693,7 +696,7 @@
begin
InitialiseHelpFiles();
PopupTBMainMenu := TPopupMenu.Create(self); // LCL will dispose
because of 'self'
- ButtonMenu.PopupMenu := PopupTBMainMenu;
+ BitBtnMenu.PopupMenu := PopupTBMainMenu;
MainForm.MainTBMenu := TPopupMenu.Create(self);
MainForm.ButtMenu.PopupMenu := MainForm.MainTBMenu;
// Add any other 'fixed' menu here.
@@ -1025,7 +1028,7 @@
EditSearch.CaretPos := APoint;
end; }
if (EditSearch.Text <> '') and (EditSearch.Text <> rsMenuSearch) then
- SpeedButtonClearSearch.Enabled := True;
+ ButtonClearSearch.Enabled := True;
if (not Sett.AutoSearchUpdate) or (not visible) or
(length(EditSearch.Text)=1) then exit;
STL := TStringList.Create;
try
@@ -1260,7 +1263,7 @@
TheMainNoteLister.LoadListNotebooks(ListBoxNotebooks.Items,
ButtonClearFilters.Enabled);
EditSearch.Hint:=rsSearchHint;
EditSearch.TextHint := rsMenuSearch;
- SpeedButtonClearSearch.Enabled := False;
+ ButtonClearSearch.Enabled := False;
EditSearch.SelStart := 1;
EditSearch.SelLength := length(EditSearch.Text);
RefreshMenus(mkAllMenu); // IndexNotes->UseList has already called
RefreshMenus(mkRecentMenu) and Qt5 does not like it.
@@ -1277,36 +1280,53 @@
TheReindexProc := @IndexNewNote;
end;
-
-
procedure TSearchForm.FormShow(Sender: TObject);
+var
+ Butt : TButton;
begin
Left := Placement + random(Placement*2);
Top := Placement + random(Placement * 2);
-// {$ifdef windows} // linux apps know how to do this themselves
- if Sett.DarkTheme then begin //
Note - Windows won't let us change button colour anymore.
+(* // {$ifdef windows} // gtk2 and qt5 with QT_QPA_PLATFORMTHEME linux
apps know how to do this themselves
+// if Sett.DarkTheme then begin // Note - Windows won't let us change
button colour anymore.
+ Color := Sett.AltColour; // black is
000000, white FFFFFF
+// Color := clGray;
+ font.Color := Sett.TextColour; // Sets
children font colour too
+// ListBoxNotebooks.Color := Sett.AltColour;
+// ListBoxNotebooks.Font.Color := clWhite;
+
ListBoxNotebooks.Color := Sett.BackGndColour;
- ListBoxNoteBooks.Font.Color := Sett.TextColour;
- EditSearch.Color := Sett.BackGndColour;
- EditSearch.Font.Color := Sett.TextColour;
-// color := Sett.HiColour;
- Color := Sett.BackGndColour;
- font.color := Sett.TextColour;
- ListViewNotes.Color := clnavy;
-// ListViewNotes.Font.Color := Sett.HiColour;
- ListViewNotes.Font.Color := Sett.BackGndColour;
+// ListBoxNoteBooks.Font.Color := Sett.TextColour;
+ EditSearch.Color := Sett.AltColour;
+// EditSearch.Font.Color := Sett.TextColour;
+// Color := Sett.BackGndColour; // OK, this seems
to set ListBoxNotes font to Black ?????
+// font.color := Sett.TextColour;
+// ListViewNotes.Color := clnavy;
+// ListViewNotes.Font.Color := Sett.BackGndColour;
splitter1.Color:= clnavy;
- end;
+ ButtonClearFilters.Color := Sett.AltColour; *) // Does work for
Qt5, not for GTK2 (but not needed), Windows ?
+
+ if Sett.DarkThemeSwitch then begin // We are not
relying on OS to set dark theme, it was --dark-theme
+ Color := Sett.AltColour; // black is
000000, white FFFFFF
+ font.Color := Sett.TextColour; // Sets
children font colour too
+ ListBoxNotebooks.Color := Sett.BackGndColour;
+ EditSearch.Color := Sett.AltColour;
+ splitter1.Color:= clnavy;
+ for Butt in [ButtonClearFilters, BitBtnMenu, ButtonSearchOptions,
ButtonClearSearch ] do
+ Butt.Color := Sett.AltColour; // Does work for
Qt5, not for GTK2 (but not needed), Windows ?
+ end;
+
+
+// end;
// MenuItemAutoRefresh.Checked := Sett.Autorefresh;
ListViewNotes.Color := ListBoxNoteBooks.Color;
- ListViewNotes.Font.Color := ListBoxNotebooks.Font.Color;
+// ListViewNotes.Font.Color := ListBoxNotebooks.Font.Color;
// {$endif}
ListBoxNotebooks.Hint := rsNotebookOptionRight;
if (ListViewNotes.Column[0].SortIndicator = siNone) then begin
BounceSortIndicator(1);
end;
{$ifdef LCLCOCOA}
- ButtonMenu.Refresh;
+ ButtonSMenu.Refresh;
ListBoxNotebooks.Hint := rsNotebookOptionCtrl;
// EditSearch.SetFocus; // Cocoa issue, 'cos we cannot make the "on
type, jump to EditSearch" work on Mac
{$endif}
@@ -1636,7 +1656,7 @@
{ ----------------- NOTEBOOK STUFF -------------------- }
- // This button clears both search term (if any) and restores all notebooks
and
+ // This ButtonSMenu clears both search term (if any) and restores all
notebooks and
// displays all available notes.
procedure TSearchForm.ButtonClearFiltersClick(Sender: TObject);
begin
@@ -1655,6 +1675,10 @@
UpdateStatusBar(inttostr(ListViewNotes.Items.Count) + ' ' + rsNotes);
end;
+
+
+
+
procedure TSearchForm.ListBoxNotebooksClick(Sender: TObject);
var
STL : TStringList;
@@ -1675,12 +1699,12 @@
end;
// Popup a menu when rightclick a notebook
-procedure TSearchForm.ListBoxNotebooksMouseUp(Sender: TObject; Button:
TMouseButton; Shift: TShiftState; X, Y: Integer);
+procedure TSearchForm.ListBoxNotebooksMouseUp(Sender: TObject; ButtonSMenu:
TMouseButton; Shift: TShiftState; X, Y: Integer);
var
HaveItem : boolean;
begin
// debugln('TSearchForm.ListBoxNotebooksMouseDown - Selected in
listboxnotebook ' + dbgs(ListBoxNotebooks.ItemIndex));
- if {$ifdef DARWIN} (ssCtrl in Shift) {$ELSE} (Button = mbRight) {$ENDIF}
then begin
+ if {$ifdef DARWIN} (ssCtrl in Shift) {$ELSE} (ButtonSMenu = mbRight)
{$ENDIF} then begin
HaveItem := (ListBoxNotebooks.ItemIndex > -1);
PopupMenuNotebook.Items[0].Enabled := HaveItem;
PopupMenuNotebook.Items[1].Enabled := HaveItem;
@@ -1691,10 +1715,8 @@
end;
end;
-
-procedure TSearchForm.ButtonMenuClick(Sender: TObject);
+procedure TSearchForm.ButtonSMenuClick(Sender: TObject);
begin
- //ShowListIndicator('From Menu');
PopupTBMainMenu.popup;
end;
@@ -1786,9 +1808,10 @@
end;
-procedure TSearchForm.SpeedSearchOtionsClick(Sender: TObject);
+procedure TSearchForm.ButtonSearchOptionsClick(Sender: TObject);
+
begin
- PopupMenuSearchOptions.PopUp;
+ PopupMenuSearchOptions.PopUp;
end;
procedure TSearchForm.MenuItemSWYTClick(Sender: TObject);
@@ -1798,7 +1821,7 @@
TheMainNoteLister.IndexNotes();
end;
-procedure TSearchForm.SpeedButtonClearSearchClick(Sender: TObject);
+procedure TSearchForm.ButtonClearSearchClick(Sender: TObject);
begin
EditSearch.text := ''; //rsMenuSearch;
//EditSearch.SetFocus;
@@ -1814,7 +1837,17 @@
DoSearchEnterPressed();
SearchActive := False;
UpdateStatusBar(inttostr(ListViewNotes.Items.Count) + ' ' + rsNotes);
- SpeedButtonClearSearch.Enabled := false;
+ ButtonClearSearch.Enabled := false;
+end;
+
+procedure TSearchForm.BitBtnMenuClick(Sender: TObject);
+begin
+ PopupTBMainMenu.popup;
+end;
+
+procedure TSearchForm.ButtonMenuClick(Sender: TObject);
+begin
+
end;
diff -Nru tomboy-ng-0.36/source/settings.lfm tomboy-ng-0.36a/source/settings.lfm
--- tomboy-ng-0.36/source/settings.lfm 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/settings.lfm 2023-03-19 10:01:36.000000000 +1100
@@ -13,7 +13,7 @@
OnHide = FormHide
OnKeyDown = FormKeyDown
OnShow = FormShow
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object PageControl1: TPageControl
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
@@ -24,10 +24,10 @@
Height = 488
Top = 0
Width = 726
- ActivePage = TabSync
+ ActivePage = TabDisplay
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Bottom = 2
- TabIndex = 2
+ TabIndex = 1
TabOrder = 0
OnChange = PageControl1Change
object TabBasic: TTabSheet
@@ -537,7 +537,7 @@
BorderSpacing.Top = 15
BorderSpacing.Right = 3
Caption = ' Sync '
- ClientHeight = 224
+ ClientHeight = 243
ClientWidth = 712
ParentColor = False
TabOrder = 1
@@ -571,7 +571,7 @@
AnchorSideBottom.Side = asrBottom
Left = 548
Height = 32
- Top = 182
+ Top = 201
Width = 154
Anchors = [akRight, akBottom]
BorderSpacing.Right = 10
@@ -589,7 +589,7 @@
Left = 172
Height = 23
Hint = 'Sync, if possible once an hour.'
- Top = 191
+ Top = 210
Width = 101
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 30
@@ -631,7 +631,7 @@
AnchorSideBottom.Side = asrBottom
Left = 15
Height = 23
- Top = 191
+ Top = 210
Width = 127
Anchors = [akLeft, akBottom]
Caption = 'Sync Enabled'
@@ -653,7 +653,7 @@
BorderSpacing.Left = 15
BorderSpacing.Top = 5
Caption = 'Token'
- ClientHeight = 35
+ ClientHeight = 54
ClientWidth = 483
TabOrder = 2
object LabelToken: TLabel
diff -Nru tomboy-ng-0.36/source/settings.pas tomboy-ng-0.36a/source/settings.pas
--- tomboy-ng-0.36/source/settings.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/settings.pas 2023-03-19 10:01:36.000000000 +1100
@@ -105,6 +105,8 @@
2022/10/21 CheckAutoStart must call its own method to trigger writing
files
2023/01/14 Save Auto Snapshot settings
2023/02/21 Drop Monospace font to last of priority, its not a real font.
+ 2023/03/11 Make a bool to indicate Qt is in charge of its colours, eg
QT_QPA_PLATFORMTHEME
+ 2023/03/18 Ensure AltColour and AltBackGndColor are set to something in
user defined scheme
}
{$mode objfpc}{$H+} //
@@ -270,6 +272,7 @@
procedure TabSpellResize(Sender: TObject);
procedure TimerAutoSyncTimer(Sender: TObject);
// Sets default colours, depending on dark or light
theme
+ // Called from MainForm.ShowForm
procedure SetColours;
private
@@ -286,6 +289,8 @@
fExportPath : ANSIString;
SearchIsCaseSensitive : boolean;
NextAutoSnapshot : TDateTime;
+ // Sets some default colours (find better way) and
sets Colour Button hint.
+ procedure CheckUserColours;
// Looks in expected place for help notes, populate
combo and public vars, HelpNotesPath, HelpNotesLang.
procedure LoadHelpLanguages();
// We load settings from confile or, if not available,
sensible defaults, save.
@@ -345,6 +350,7 @@
HelpNotesLang : string; // either two char code or ''
AreClosing : boolean; // False until set true by mainUnit
FormClose.
BackGndColour : TColor;
+ AltBackGndColor : TColor; // When selected Text looses focus
TextColour : TColor;
HiColour : TColor;
TitleColour : TColor;
@@ -353,7 +359,9 @@
UsualFont : string;
FixedFont : string;
DefaultFixedFont : string;
- DarkTheme : boolean;
+ DarkThemeSwitch : boolean; // Dark Theme because user provided
--dark-theme, set in main unit.
+ DarkTheme : boolean; // Dark Theme because we detected it
ourselves. Set by main unit.
+ QtOwnsColours : boolean; // Qt[5,6] is in charge of its own
colours, probably using QT_QPA_PLATFORMTHEME, but not for kmemo
DebugModeSpell : boolean;
// Indicates SettingsChanged should not write out a new file cos we
are loading from one.
MaskSettingsChanged : boolean;
@@ -405,7 +413,6 @@
Sett : TSett;
const
- // Note we set DarkTheme colors and all
HiLight colours in MainUnit ?? No, we set them here !
Placement = 45; // where we position an opening
window. Its, on average, 1.5 time Placement;
@@ -433,6 +440,7 @@
Colours,
Clipbrd,
tb_symbol,
+ uQt_Colors,
ResourceStr; // only partially so far ....
var
@@ -718,6 +726,7 @@
// user user has 'closed' (ie hide) then Spell was freed.
MaskSettingsChanged := False;
Label15.Caption:='';
+ CheckUserColours;
end;
// We only really close when told by RTSearch that The Exit Menu choice from
TrayIcon was clicked.
@@ -869,6 +878,9 @@
end;
end;
+
+
+
// Will read and apply the config file if available, else sets sensible
defaults
// Is only called at startup and assumes the config dir has been checked
and
// LabelSettingPath.Caption contains an appropriate file name.
@@ -919,6 +931,7 @@
FixedFont := ConfigFile.readstring('BasicSettings', 'FixedFont',
DefaultFixedFont);
if FixedFont = '' then FixedFont := DefaultFixedFont;
ButtonFixedFont.Hint := FixedFont;
+ // ------------------- C O L O U R S -------------------
BackGndColour:= StringToColor(Configfile.ReadString('BasicSettings',
'BackGndColour', '0'));
HiColour := StringToColor(Configfile.ReadString('BasicSettings',
'HiColour', '0'));
TextColour := StringToColor(Configfile.ReadString('BasicSettings',
'TextColour', '0'));
@@ -926,6 +939,7 @@
LinkColour := StringToColor(Configfile.ReadString('BasicSettings',
'LinkColour', '0'));
UserSetColours := not ((BackGndColour = 0) and (HiColour = 0) and
(TextColour = 0) and (TitleColour = 0) and (LinkColour = 0));
// Note - '0' is a valid colour, black. So, what says its not set is
they are all '0';
+ CheckUserColours;
HelpNotesLang := Configfile.ReadString('BasicSettings',
'HelpLanguage', HelpNotesLang);
SetHelpLanguage();
@@ -1160,28 +1174,61 @@
end;
end;
+{ Colors - if its GTK2 or a Qt5 with a QT_QPA_PLATFORMTHEME=[gtk2, qt5ct] then
most colors will be right.
+ However, the KMemo might be wrong as its always set to a defult light set,
ignoring OS.
+ So, we must always set Sett's colors for, at least, KMemo to use.
+ DarkThemeSwitch tells us to apply the setting to what ever other
components we can too.
+ SetColors is called by TMainForm.TestDarkThemeInUse during startup,
DarkTheme* may have been set.
+ It tests for a gtk2, qt5 using qt5ct and defers to qt5ct if possible.
Otherwise, sets some
+ (hopefully) appropriate colors for either a light or dark theme. These
colors
+ are always used for the KMemo and possibly, when DarkThemeSwich is used,
for what other
+ screens I can. }
+
procedure TSett.SetColours;
+{$ifdef LCLQT5}
+var
+ Qt_Colors : TQt_Colors; {$endif}
// pink = $EEEEFF, White is $FFFFFF, Black is $000000
begin
- if DarkTheme then // ToDo : must add this to user set
colours, sigh .....
- //AltColour := $282828 // Gray, BackGround Colour of
Alternating rows in some ListViews
- AltColour := $606060 // A colour that will show both
black and white test
- else AltColour := clDefault; // it gets used as a background and
needs to be a bit near it
+ {$ifdef LCLQT5} // First we will try the special Qt5
ways of settings colours
+ // If user has set QT_QPA_PLATFORMTHEME=gtk2 this bit drops through, all
components except KMemo are good.
+ Qt_Colors := TQt_Colors.Create; // needs some work for qt6
+ try
+ if Qt_Colors.FoundColors then begin // Will be false if user
not using qt5ct
+ BackGndColour:= Qt_Colors_Rec.QColorBackground;
+ HiColour := Qt_Colors_Rec.QColorHighLight+1; // This is, eg Crtl
H type highlighting, not selection. +1 to make unique
+ AltColour := Qt_Colors_Rec.QColorLessBright; // Used for
selected Text
+ TextColour := Qt_Colors_Rec.QColorText;
+ TitleColour:= Qt_Colors_Rec.QColorLink;
+ LinkColour := Qt_Colors_Rec.QColorLink;
+ AltBackGndColor := Qt_Colors_Rec.QColorLessBright; // Selected
background colour
+ QtOwnsColours := true;
+ exit;
+ end;
+ finally
+ Qt_Colors.Free;
+ end;
+ {$endif}
if UserSetColours then exit; // will have already been set by
config or by colour form.
- if DarkTheme then begin
- //debugln('Its definltly a Dark Theme');
- BackGndColour:= clBlack; // eg $000000
- HiColour := clDkGray;
- TextColour := clLtGray;
- TitleColour:= clTeal;
- LinkColour := clTeal;
+ if DarkTheme or DarkThemeSwitch then begin
+ BackGndColour:= $303030; // KMemo Background
+ AltColour := $606060; // Some panel's background color
+ HiColour := $600001; // a dark blue; This is, eg Crtl
H type highlighting, not selection !
+ TextColour := clWhite;
+ TitleColour:= $B8B800;
+ LinkColour := $B8B801;
+ AltBackGndColor := clGray; // Selected text, both focused and
unfocused
end else begin
BackGndColour := clCream;
- HiColour := clYellow;
+ AltColour := clDefault;
+ HiColour := clYellow-1;
TextColour := clBlack;
TitleColour := clBlue;
- LinkColour := clBlue;
+ LinkColour := clBlue+1; // One unit of red, no one will
notice, but don't subtract 1 from xxxx00 or add 1 to xxxxFF
+ AltBackGndColor := clLtGray;
end;
+ // if DarkThemeSwitch then color := AltColour; No, cannot change color
of the Tabsheet, looks horrible
+
end;
procedure TSett.SetHelpLanguage();
@@ -1263,8 +1310,19 @@
WriteConfigFile();
end;
end;
+ CheckUserColours;
end;
+procedure TSett.CheckUserColours;
+begin
+ if UserSetColours then begin
+ ButtonSetColours.Hint := 'Custom Colours in use';
+ // ToDo : AltBackGndColour may not be appropriate here, wot is ?
And AltColour ????
+ AltBackGndColor := clGray;
+ AltColour := clLtGray;
+ end else
+ ButtonSetColours.Hint := 'Default Colours';
+end;
procedure TSett.ButtonFixedFontClick(Sender: TObject);
var
ISMono : boolean = false;
diff -Nru tomboy-ng-0.36/source/tb_symbol.lfm
tomboy-ng-0.36a/source/tb_symbol.lfm
--- tomboy-ng-0.36/source/tb_symbol.lfm 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/tb_symbol.lfm 2023-03-19 10:01:36.000000000
+1100
@@ -7,7 +7,7 @@
ClientHeight = 372
ClientWidth = 685
OnCreate = FormCreate
- LCLVersion = '2.3.0.0'
+ LCLVersion = '2.2.0.2'
object StringGrid1: TStringGrid
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
diff -Nru tomboy-ng-0.36/source/tb_symbol.pas
tomboy-ng-0.36a/source/tb_symbol.pas
--- tomboy-ng-0.36/source/tb_symbol.pas 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/tb_symbol.pas 2023-03-19 10:01:36.000000000
+1100
@@ -143,6 +143,7 @@
Result := ((byte(Value) shr TheBit) and 1) = 1;
end;
begin
+ result := false;
case length(Uch) of
0 : exit(false);
1 : exit(not BitSet(Uch[1], 7)); //
0xxxxxxx
diff -Nru tomboy-ng-0.36/source/Tomboy_NG.lpi
tomboy-ng-0.36a/source/Tomboy_NG.lpi
--- tomboy-ng-0.36/source/Tomboy_NG.lpi 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/Tomboy_NG.lpi 2023-03-19 10:01:36.000000000
+1100
@@ -900,12 +900,22 @@
<local>
<CommandLineParams
Value="--config-dir=/home/dbannon/.config/tomboy-ng-alt"/>
</local>
+ <environment>
+ <UserOverrides Count="1">
+ <Variable0 Name="QT_QPA_PLATFORMTHEME" Value="qt5ct"/>
+ </UserOverrides>
+ </environment>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<CommandLineParams
Value="--config-dir=/home/dbannon/.config/tomboy-ng-alt"/>
</local>
+ <environment>
+ <UserOverrides Count="1">
+ <Variable0 Name="QT_QPA_PLATFORMTHEME" Value="qt5ct"/>
+ </UserOverrides>
+ </environment>
</Mode0>
</Modes>
</RunParams>
@@ -920,7 +930,7 @@
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
- <Units Count="38">
+ <Units Count="39">
<Unit0>
<Filename Value="Tomboy_NG.lpr"/>
<IsPartOfProject Value="True"/>
@@ -1135,6 +1145,11 @@
<IsPartOfProject Value="True"/>
<UnitName Value="fpTTF"/>
</Unit37>
+ <Unit38>
+ <Filename Value="uqt_colors.pas"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="uQt_Colors"/>
+ </Unit38>
</Units>
</ProjectOptions>
<CompilerOptions>
diff -Nru tomboy-ng-0.36/source/Tomboy_NG.lpr
tomboy-ng-0.36a/source/Tomboy_NG.lpr
--- tomboy-ng-0.36/source/Tomboy_NG.lpr 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/source/Tomboy_NG.lpr 2023-03-19 10:01:36.000000000
+1100
@@ -25,7 +25,7 @@
Notebook, Spelling, Mainunit, BackupView, recover, Index,
autostart, hunspell, sync, syncutils, ResourceStr, colours,
cli, RollBack, commonmark, notenormal, transgithub,
- import_notes, JsonTools, kmemo2pdf, tb_symbol, fpTTF;
+ import_notes, JsonTools, kmemo2pdf, tb_symbol, fpTTF, uQt_Colors;
{$R *.res}
diff -Nru tomboy-ng-0.36/source/uqt_colors.pas
tomboy-ng-0.36a/source/uqt_colors.pas
--- tomboy-ng-0.36/source/uqt_colors.pas 1970-01-01 10:00:00.000000000
+1000
+++ tomboy-ng-0.36a/source/uqt_colors.pas 2023-03-19 10:01:36.000000000
+1100
@@ -0,0 +1,166 @@
+unit uQt_Colors;
+{ Copyright (C) 2023 David Bannon
+
+ License:
+ This code is licensed under BSD 3-Clause Clear License, see file
License.txt
+ or https://spdx.org/licenses/BSD-3-Clause-Clear.html
+
+ ------------------
+
+ This is a unit, only invoked if using the Qt5 widget set (some mods needed
for Qt6)
+ that will alter how the app manages colours if (and only IF) the user has
the
+ QT_QPA_PLATFORMTHEME=qt5ct in the env. It does NOT respect the
-platformtheme switch
+ because one dash means one char switch in POSIX, so, we don't consider
+ -platformtheme qt5ct is a switch. (TApplication does make the commandline
+ available Davo ....)
+ This unit reads the colours that qt5ct wants us to use and passes a subset
+ of them back for KMemo to use.
+
+ Note : Unix only, makes some assumptions about paths, easy fix ....
+
+ History :
+ 2023-03-13 Initial release.
+}
+{$mode ObjFPC}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, graphics;
+
+type TQt_Colors_Rec = record
+ QColorLink : TColor;
+ QColorBright : TColor;
+ QColorLessBright : TColor;
+ QColorBackground : TColor;
+ QColorAltBackGround : TColor;
+ QColorText : TColor;
+ QColorHighLight : Tcolor;
+ end;
+
+{ TQt_Colors }
+type
+ TQt_Colors = class
+ private
+ function GetActiveColors : string;
+ function GetIndexedColor(CSt : string; const Index : integer) : TColor;
+
+ public
+ FoundColors : boolean;
+ constructor Create();
+end;
+
+var
+ Qt_Colors_Rec : TQt_Colors_Rec;
+
+implementation
+
+uses IniFiles, Forms;
+
+const
+ CONF = '/.config/qt5ct/qt5ct.conf'; // the conf file has an entry that
points to the selected color_scheme
+
+{ TQt_Colors }
+
+function TQt_Colors.GetActiveColors: string;
+var
+ ConfigFile : TINIFile;
+begin
+ result := GetEnvironmentVariable('HOME') + CONF;
+ if FileExists(result) then begin
+ ConfigFile := TINIFile.Create(result);
+ try
+ result := ConfigFile.readstring('Appearance', 'color_scheme_path',
'');
+ finally
+ ConfigFile.free;
+ end;
+ end;
+ if Result = '' then exit;
+ if FileExists(Result) then begin
+ ConfigFile := TINIFile.Create(Result);
+ try
+ result := ConfigFile.readstring('ColorScheme', 'active_colors',
'');
+ finally
+ ConfigFile.free;
+ end;
+ end;
+end;
+
+function TQt_Colors.GetIndexedColor(CSt: string; const Index: integer): TColor;
+var
+ StL : TStringList;
+ St : String;
+ CValue : Cardinal;
+ R, G, B : byte; // thats the order in Qt's view
+begin
+ StL := TStringList.Create; // probably more efficent to use CSt.Split
.....
+ StL.Delimiter := ' ';
+ Stl.DelimitedText := CSt;
+ St := StL[Index];
+ Stl.Free;
+ if St.length < 1 then exit(clBlack); // ToDo : That is an uncaught
error
+ St[1] := '$';
+ St := St.Replace(',', '');
+ CValue := strtoInt(St) and $ffffff;
+ B := CValue and $ff;
+ CValue := CValue shr 8;
+ G := CValue and $ff;
+ CValue := CValue shr 8;
+ R := CValue and $ff;
+ result := TColor((B shl 16) + (G shl 8) + R); // Thats TColor order.
+end;
+
+constructor TQt_Colors.Create();
+var
+ St : String;
+begin
+ if (GetEnvironmentVariable('QT_QPA_PLATFORMTHEME') <> 'qt5ct') then exit;
// Note : not responding to -platformtheme switch
+ St := GetActiveColors();
+ if St = '' then exit;
+ Qt_Colors_Rec.QColorText := GetIndexedColor(St, 0); // 0 is
Text - used for usual text
+ Qt_Colors_Rec.QColorBright := GetIndexedColor(St, 2); // 2 is
Bright
+ Qt_Colors_Rec.QColorLessBright := GetIndexedColor(St, 3); // 3 is
LessBright
+ Qt_Colors_Rec.QColorBackground := GetIndexedColor(St, 9); // 9 is
background
+ Qt_Colors_Rec.QColorLink := GetIndexedColor(St, 14); // 14
is Link index 0..19
+ Qt_Colors_Rec.QColorHighLight := GetIndexedColor(St, 12);
+ Qt_Colors_rec.QColorAltBackGround := GetIndexedColor(St, 16);
+ FoundColors := True;
+ //writeln('We have found suitable qt5ct colors');
+end;
+
+end.
+
+{
+WindowText = 0;
+NormalBackGround = 1;
+Link = 14;
+
+if we have a qt env setting, QT_QPA_PLATFORMTHEME=qt5ct we can
+look in /$HOME/.config/qt5ct/qt5ct.conf Its an ini file that we will find, in
+section [Appearance], color_scheme_path, value being eg
/usr/share/qt5ct/colors/darker.conf
+
+We open this file, also ini, the value of [ColorScheme], has a line that looks
like this -
+
+active_colors=#ffffff, #424245, #979797, #5e5c5b, #302f2e, #4a4947, #ffffff,
#ffffff, #ffffff, #3d3d3d, #222020, #e7e4e0, #12608a, #f9f9f9, #0986d3,
#a70b06, #5c5b5a, #ffffff, #3f3f36, #ffffff
+
+each subvalue may be 6 or 8 hex digits, we loose the first two if its 8.
+
+White = #FFFFFF (careful, apparently Qt can be funny about ffffff)
+Six Digits, Red, Green, Blue, 2 each. Higher value means lighter.
+Black is #222222 - I guess it gets blacker than this but not in the themes I
see.
+
+Red = #ff0000
+Green = #00FF00
+Blue = #0000FF
+
+Digits to left of 6 rightmost characters are Opacity. Strip them off.
+
+TColor - Blue-Green-Red
+=========
+clBlue = TColor($FF0000);
+clRed = TColor($0000FF);
+clGreen = TColor($008000);
+clBlack = TColor($000000);
+clWhite = TColor($FFFFFF);
+
+}
diff -Nru tomboy-ng-0.36/whatsnew tomboy-ng-0.36a/whatsnew
--- tomboy-ng-0.36/whatsnew 2023-02-22 20:42:59.000000000 +1100
+++ tomboy-ng-0.36a/whatsnew 2023-03-19 10:01:36.000000000 +1100
@@ -1,10 +1,3 @@
-From 0.35 to 0.36 -
-New Feature export as PDF.
-New Feature insert a symbol or accented character.
-Bug fix in column mode of calculator.
-Warn user about setting non mono font.
-All Tomdroid functionality removed.
-A fix for SWYT not finding some text in a brand new note.
-Can set colour of a link, more suitable default.
-Use of TextHint to better indicate EditSearch role.
-Revised note button colors for better dark theme use.
+More uniform colors when used with qt5ct.
+Man page added info re colors.
+Indicator that custom colors being used.