Skip to content

Comments

Added Present's background color as an option to the Preferences window.#2568

Merged
benfry merged 5 commits intoprocessing:masterfrom
joelmoniz:presentBckColor
Jul 25, 2014
Merged

Added Present's background color as an option to the Preferences window.#2568
benfry merged 5 commits intoprocessing:masterfrom
joelmoniz:presentBckColor

Conversation

@joelmoniz
Copy link
Member

Hey,

In these few commits, I've added an option for the user to conveniently choose a background color for Present from the Preferences window. This can be done in 2 ways:

  1. By clicking on a color preview box, which automatically pops up a ColorChooser.
  2. By typing a hex color into the Text Field.

The text field has been designed to accept a hex color of the form #xxxxxx and xxxxxx, (x- 0 to F), and auto-previews the color once the user enters a valid hex color.

A Cancel button has also been added to the ColorChooser, because it seemed like a nice feature to have for both the Color Selector tool, as well as for this particular application.

Thanks

joelmoniz added 5 commits June 7, 2014 11:03
Sets present.bgcolor on clicking OK, sets color in Preferences window from
Preferences.txt on opening the window.
Clicking on the color preview brings up a color selector; Inputting a hex color automatically previews it
Rm CustomColorChooser, add Cancel to ColorChooser,
Formatting changes,
Removed unnecessary listener,
Inerchange preview color and text field.
Cursor to hand on mouseover & new border for color preview
@benfry
Copy link
Contributor

benfry commented Jun 7, 2014

Whoa, this is much more complicated than necessary. The color choosing is already implemented in the Export to Application dialog, it should only be a couple lines of code to add that to the Preferences window as well.

@benfry benfry closed this Jun 7, 2014
@fjenett
Copy link
Member

fjenett commented Jun 8, 2014

Ben, it's a bit unclear to us how we should proceed. I propose:

  • make child class JavaEditor.ColorPreference into a full class so i can be reused
  • replace in JavaEditor
  • add ColorPreference to preferences dialog where we had our custom color chooser button
  • remove text input field from preferences dialog (as it is avail through color chooser dialog)
  • keep the "cancel" button in the color chooser dialog?

OK?

@benfry
Copy link
Contributor

benfry commented Jun 8, 2014

Perhaps I'm just confused by the commit. It looks like an entire new color chooser class has been added and removed. Or maybe there's a line endings problem that makes this look much larger?

Check out the links for those commits... Maybe it's just a matter of re-doing the pull request so that I can see what's actually going on?

@benfry benfry reopened this Jun 8, 2014
@fjenett
Copy link
Member

fjenett commented Jun 8, 2014

Oh, you are looking at every single commit. That is not needed, just click "Files changed" at the top, that gives you the changes that will be applied in relation to the current code.

And yes, Joel initially duplicated the color chooser and i asked him to reuse the one we already had instead. So it is actually not that much change in total.

We can even slim it down further and make the style be concise if we make ColorPreference into a full class and use that instead of our own custom items. Should we do that?

benfry added a commit that referenced this pull request Jul 25, 2014
Added Present's background color as an option to the Preferences window.
@benfry benfry merged commit 8daa225 into processing:master Jul 25, 2014
@benfry
Copy link
Contributor

benfry commented Jul 25, 2014

Let's take the extra text field out of there and just have people click the color. It's extra complexity that's just not needed.

@joelmoniz joelmoniz deleted the presentBckColor branch July 26, 2014 13:39
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants