perryhelion / Hex-Explorer

This is a fairly simple program that might prove useful to anyone unfamiliar with the 16 million or so colours available to them when programming in any computer language that uses the hexadecimal numbers to represent the three colour components of the RGB system. Each colour component has 256 different values (from 0 to 255) and can be 'mixed' together to make pretty much any colour in any shade or hue that you could want. It was made as a learning exercise for me to see how straightforward or not it was to program in QML and to see what it was like to use the Ubuntu SDK. Theoretically you can compile the same program for a range of platforms, but it would require removing or changing the Ubuntu specific references. i.e 'UbuntuColors.orange', 'import Ubuntu.Components 1.3', possibly the PageHeader etc.
Other
2 stars 1 forks source link

[feature request] make hex code selectable and copyable #7

Open gbdomubpkm opened 2 years ago

gbdomubpkm commented 2 years ago

Hello. Thank you for this usefull app.

Can you please make the gotten hex code of the first page of your app selectable and copyable so that it can be pasted in the dedicated section of Webber when creating a webapp.

Hello @Danfro . Just in case, I'm just bringing this to your attention too because I know you're developing good stuff all over the place.

Thanks in advance to both of you. screenshot20211219_024524128

Danfro commented 2 years ago

@perryhelion are you still actively maintaining the app?

@gbdomubpkm Are you in our Telegram or Matrix groups? I do have a click for testing for you but github does not allow uploading it. Can you ping me there please?

gbdomubpkm commented 2 years ago

Hello @Danfro. Thanks for your work on this feature request. For the copy/paste, that's exactly right ! For the rest, it's difficult to compare because the installation of your test click erases the original click which makes the comparison not easy.

perryhelion commented 2 years ago

Hi @gbdomubpkm and @Danfro - sorry, not been checking these accounts for a while but thanks for your comments. Would be happy to try and take a look but don't have a great deal of time available at the moment.

@Danfro - is it a relatively straightforward adjustment to the TextInput section (id: sliderValue) that allows copying of text or is it a bit more involved than that? (The 'Hex string' is selectable by mouse and using Ctrl + C on keyboard to copy it - although that's not entirely useful if you're trying to copy it in a 'touchscreen only' scenario :) )

Kindest regards, pHelion

Danfro commented 2 years ago

Oh oh. Because I did not hear anything, I thought you abandoned the project and re-released the app including all the changes. Sorry about that. It is available in OpenStore if you want to have a look.

I did quite a massive rewrite of most of the qml part excepting the slider layout. How do we want to proceed?

perryhelion commented 2 years ago

Hi @Danfro, that's actually really nice to hear - I wasn't sure that I'd have much time available to keep HexExplorer up to date, particularly if they move to a newer framework and whatnot for future versions of Ubuntu Touch, so if you're happy to keep it maintained and available then that'd be great!

On paper it's fairly straightforward maths ( 256 256 256 = 16 777 216 ) but being able to get 16.5 million variations from just 3 primary colours still seems surprising to me.

So initally I made the application because I wanted to be able to play around with the colours - partly to be able to see that it really was true, partly so that I could have a handy and fun way of finding what Hex values gave which colours, and partly because it seemed straightforward enough to make something like that with my limited knowledge of qml.

On my last re-write I was curious to see if you could make a Qt Quick application without needing any of the Ubuntu Components, but for it to still fit in with the 'look and feel' of an Ubuntu Touch application - the idea being that the program would work on more or less any platform even if the Ubuntu Components weren't available.

As it turns out I ended up using them for the i18n.tr() functionality because I couldn't figure out how to get translations working without them but it's nice to see your re-write making full use of the Ubuntu Touch specific features and using qml in a more adept way than my more rudimentary 'stick some blocks together' approach.

I feel like the application is in good hands - you've been able to make a much better Ubuntu Touch version than I would be able to cobble together - and I'm happy for you to take ownership and make whatever tweaks and improvements you would like.

The delightful thing about Free/Libre Software and the GPL is that not only is it fine to take a program, make some changes and then share those changes with other folks, but that it is actively encouraged to do so :)

Danfro commented 2 years ago

Thanks for your kind words.

As it is fine with you, I don't mind keeping HexExplorer maintained. Thanks for your approval. It is good to know you don't mind.

I like your attempt to create the app in a way so it can be ported easier. I for myself am much more familiar with UT apps and don't have a device running another OS for testing. So I decided to stick with UT components unless a 100% cross compatible way is possible. I know there are a few cross-OS apps in our store. So if I have time, I may try to manage that too.

Doing the tranlations was actually quite tricky. The "ApplicationWindow" component did not work with i18n.tr. That is mainly why I started rewriting and restructuring the app. But I am glad it now works as pure qml multi-arch app.

I hope you are happy with the references to your work and the updated readme. I wrote it assuming you do not wish to maintain it anymore. If there is anything you would like to have changed please let me know.

Two things I have on my TODO list:

The second is more a thing of doing it, kind of a "bubble swap" task. For the first I am not sure if working out a kind of difference would suffice.