robert7 / nixnote2

Nixnote - Evernote desktop client for Linux
GNU General Public License v3.0
297 stars 32 forks source link

A new theme, new options, bug fixes, and optimizations #198

Closed boo-yee closed 1 year ago

boo-yee commented 1 year ago

Added a new dark theme. As AppImage users cannot use dark theme set by adwaita-qt, so I added some css in the themes.ini.

Optimised the sql statements of note creating and updating. Optimised the sql statements of batch operations, including movings, deletings, and restorings. Earlier, the time complexity of batch operations was O(n), which may freeze the UI when too many items were operated. It is O(1) now and the UI will not be frozen by them.

Added an option to listen to the commands from command line. (When it is enabled, the shared memory size will be set to 128 bytes; when disabled, it will be set to 1 byte.) Decoupled the functions of CmdLineTool(except signalGui()) from shared memory. If the user do not use the CmdLineTool, this option can help save some RAM space. This option is enabled as default.

Made Nixnote export the stack attribute when exporting notes. Fixed a bug about stack attribute exporting.

Added an option to save the UI state changes when Nixnote exits. When enabled, Nixnote will remember the changes on the UI made by the users. When disabled, Nixnote will not do so, but can exit faster. This option is enabled as default.

Saved the note content when Nixnote receives specific signal interruptions(SIGINT, SIGHUP). Sometimes, we might forget to save the note content before exiting nixnote, this function can help on this case.

Added a default theme named with 'Default' to the theme menu when no theme is found in themes.ini.

Allocated the tageditor's tags dynamically. RAM usage optimizations. I compressed some icon files, and lowed down the updating frequency of the sync button, and made some objects be released when they won't be referred to.

Fixed file downloading under Windows. Previously in Windows edition, image file downloading did not work. It is because the url format was file:////, there is one tedious slash.

robert7 commented 1 year ago

Hi @boo-yee, thanks. I'll review & test the changes and let you know. Robert

boo-yee commented 1 year ago

Hi @boo-yee, thanks. I'll review & test the changes and let you know. Robert

Thank you first for your work. I suddenly found some issues, so I draft it for now. I'll reopen it later.

robert7 commented 1 year ago

Hi, I looked at the changes.... wow... it is really a lot ๐Ÿ˜€ I skimmed through, it looks those are meaningful changes. I can't visually verify all is correct ๐Ÿ˜€

To be honest, I don't use Nixnote for already few years and don't even have linux on my desktop (for few years already). So I can't really do detailed function checks. I need to trust youโ€ฆ I had to install linux today on my ARM mac in a virtual machine to do the basic checks ๐Ÿ˜€

It compiles & runs and it seems to work ๐Ÿ˜‚

So I'm OK with merge, when you say it is ready.

One minor things - there are few "unit" tests (see file ".travis.yml"). In your branch, the tests will not compile - please fix it.

Compile & run tests (see also .travis.yml)

qmake testsrc/tests.pro CONFIG+=release PREFIX=/usr QMAKE_RPATHDIR+=$TIDY_LIB_DIR &&
      make &&
      ./qmake-build-release-t/tests -platform offscreen

current compilation error:

/usr/bin/ld: qmake-build-release-t/NixnoteStringUtils.o: in function `NixnoteStringUtils::getCheckboxImageUrl(bool)':
/home/parallels/nixnote2/src/utilities/NixnoteStringUtils.cpp:94: undefined reference to `global'
robert7 commented 1 year ago

to maintain the history I

robert7 commented 1 year ago

this caused minor conflict in the changelog files - pls update them in pull request

boo-yee commented 1 year ago

OK.

boo-yee commented 1 year ago

I changed NixnoteStringUtils code and ran the unit test locally and passed it. It should be fine now.

robert7 commented 1 year ago

thanks, I'll recheck later

robert7 commented 1 year ago

thanks!!

vitaly-zdanevich commented 1 year ago

Installed 2.1.10 - how to enable dark theme?

vitaly-zdanevich commented 1 year ago

Edit -> Themes do nothing.

vitaly-zdanevich commented 1 year ago

Oh, only icons changes, for notes and notebooks.

vitaly-zdanevich commented 1 year ago

Oh, I need to restart...

Dark Blue is THE DARK, THANKS!

I think, better to group dark themes with non dark.

And maybe rename to Dark Blue + GUI.

And defect of this theme - missing mouse onhover selection of menus.

And links color can be fixed:

image

And can we please have AMOLED total black please?

vitaly-zdanevich commented 1 year ago

Also, code blocks and scrollbars background are not dark:

image

boo-yee commented 1 year ago

Oh, I need to restart...

Dark Blue is THE DARK, THANKS!

I think, better to group dark themes with non dark.

And maybe rename to Dark Blue + GUI.

And defect of this theme - missing mouse onhover selection of menus.

And links color can be fixed:

image

And can we please have AMOLED total black please?

This theme is just a temporary solution for AppImage. When migration to qtwebengine is finished, native packages on Linux distros will be probably usable, and something like adwaita-qt can be used then.