bitset: Add bit number to tooltip
ClosedPublic

Authored by athurh on Apr 16 2019, 9:55 PM.

Details

Summary

Add the bit number to the tooltip

Diff Detail

Repository
R353 KCalc
Branch
bit_tooltip
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11741
Build 11759: arc lint + arc unit
athurh created this revision.Apr 16 2019, 9:55 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptApr 16 2019, 9:55 PM
athurh requested review of this revision.Apr 16 2019, 9:55 PM
aacid added a comment.Apr 17 2019, 5:29 PM

Does this hide the existing "Click on a Bit to toggle it." tooltip?

I guess it does, how do you feel about it?

Yes, the "Click on a Bit to toggle it." tooltip only shows when the cursor is not over a bit.
If you want to set the bit 19, for example, it's annoying to have to count the bits to know exactly which is the correct one.

aacid added a subscriber: cfeck.Apr 17 2019, 6:32 PM

Christoph, what do you think?

Would could use a tooltip that shows both:

Bit %d\n
(Click to toggle)

I don't like the idea to show too much information each time the mouse is over a bit button.

Showing the same information over and over again doesn't help and can quickly become annoying.

How about changing the cursor shape to PointingHandCursor while the mouse is over a bit button?
I'm not sure what the best practices are when using cursor shapes.

aacid added a comment.Apr 20 2019, 9:00 PM

I don't like the idea to show too much information each time the mouse is over a bit button.

Showing the same information over and over again doesn't help and can quickly become annoying.

How about changing the cursor shape to PointingHandCursor while the mouse is over a bit button?

We don't do that for regular buttons so doesn't seem the best of the ideas to me.

What maybe makes sense is "half-paint" them on mouse over?

athurh updated this revision to Diff 56692.EditedApr 22 2019, 1:07 AM

I changed the border of the button from 2 to 1 so that it looks more clear when is half-painted.

The on hover looks really great.

Do you think we should also paint in "on hover" even if it's set when the mouse is over it? I'm conflicted

kcalc_bitset.cpp
100

we don't use tr but i18n, this should be i18n("Bit %1", bitCounter)

athurh updated this revision to Diff 57889.May 11 2019, 6:35 AM

It's probably better to paint the bits when they are in the on state too, it's more consistent.
But I added different alpha values, to make it easier to see when the bit changes by clicking with the mouse.
I have tried several values and these seem to go well with dark and light themes.

aacid accepted this revision.May 12 2019, 8:18 AM

Looks great :)

This revision is now accepted and ready to land.May 12 2019, 8:18 AM
aacid added a comment.May 12 2019, 8:20 AM

Oh, i tried to land the code but the automatic checker complained about your full name being "athurh". Do you have a surname?

Oh, i tried to land the code but the automatic checker complained about your full name being "athurh". Do you have a surname?

Looks like I can't change the username in phabricator's settings.
If some admin can, my complete name is "athurh eof" ;-)

aacid added a comment.May 12 2019, 9:55 PM

You've sadly triggered my "this is probably a fake name" detector.

At this point we're not sure if we should accept contributions with non real/identifiable names.

See the discussion at https://mail.kde.org/pipermail/kde-community/2019q2/thread.html

Sadly, I prefer to stay anonymous.
I don't care if my name appears in the commit, so you can push the changes as your own.

aacid added a comment.May 19 2019, 7:59 PM

Can you explain what are your reasons to want to stay anonymous? Or you feel you'd lose anonymity already by doing so?

Meanwhile, i think it's fair to accept your contribution if you propose a commit to the kde-dev-scripts with this patch

diff --git a/relicensecheck.pl b/relicensecheck.pl
index e9265bf..0aac179 100755
--- a/relicensecheck.pl
+++ b/relicensecheck.pl
@@ -32,6 +32,7 @@ use List::Util qw(any);
 my %license_table = (
     'acrouthamel'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
     'aheinecke'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
+    'athurhfree'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
     'cgerloff'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
     'flherne'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
     'huoni'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
@@ -409,6 +410,7 @@ my %secondary_mail_addresses = (
     'thb@net-bembel.de' => 'tbaumgart',
     'trev@adblockplus.org' => 'palant',
     'tsdgeos@terra.es' => 'aacid',
+    'athurh@gmail.com' => 'athurhfree',
 );
 
 my %ruletable;

This way we won't have problems if ever we want to relicense the code.

Can you explain what are your reasons to want to stay anonymous? Or you feel you'd lose anonymity already by doing so?

There's no particular reason, just privacy.

I could create an account with a random name and everything would be fine.
Since there is no way to verify the names, I don't know why a Random Name is somehow better than a randomnick.

Anyway I have send the patch to kde-dev-scripts.

aacid closed this revision.May 21 2019, 7:55 PM