Ticket #8865 (closed enhancement: fixed)

Opened 5 years ago

Last modified 3 years ago

Slider bar should change brush and line width

Reported by: brian Owned by: Quozl
Priority: normal Milestone: 11.2.0-M3
Component: paint/drawing-activity (oficina) Version: 1.5/1.0 Software Build os860 aka 10.1.3
Keywords: Cc: FGrose, godiard
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking:

Description

The slider bar (circles on the top of the XO keyboard) should change the width of the paintbrush and line widths in Paint activity. This would make drawing-without-modifying-tools-by-mouse easier.

example of one way to do this -- in Area.py... function key_press:

if event.keyval == 65474: # 65474 to 65477 are slider bar keys

self.line_size = 2

self.configure_line(self.line_size)

Change History

  Changed 5 years ago by mstone-xmlrpc

  • keywords cjbfor9.1.0 added
  • milestone changed from 8.2.1 to 9.1.0

Pushing out to 9.1.0, per edmcnierney's request.

  Changed 4 years ago by Quozl

  • owner changed from alexandre to Quozl
  • status changed from new to assigned
  • next_action changed from add to build to review

A patch proposed by Gonzalo Odiard which adds relative size change using the slider keys.

  Changed 4 years ago by FGrose

  • milestone changed from 9.1.0-cancelled to 10.1.3

Testing with Paint-28 on XO-1 with os852, the f5 & f6 buttons have been assigned to Journal Search and toggle Frame, respectively.

In order to maintain the keyboard utility of width changes, the f7 should be reassigned to -5 units, or the Journal and Frame actions overridden.

If the 2-button adjustment control is adopted, perhaps an <alt f7> keypress invoke a -1 unit action and <alt f8> a +1 unit action.

Additionally, the tool's size_spinbutton value is not updated when the slider bar buttons are pressed. Thus, the display of tool size in its palette is misleading (although the new, tool area outline may mitigate the confusion).

  Changed 4 years ago by pgf

  • cc FGrose added

at the same time that we had sugar grab F5 and F6, we set things up so that Fn-F<any> would map to F<any>. so holding the Fn key and the slider should (might?) get you what you need. i say "might?" because the slider has some "half" keys, in between the "normal" F-keys, and they might not have been picked up in the new mapping. please test that.

  Changed 4 years ago by FGrose

Pressing <fn f5-8> in Paint-28 on os852, XO-1 results in the same actions as <f5-8> keypresses, but pressing <ctrl f5-8> has the intended actions of -5, -1, +1, +5.

I didn't notice any 'half-key' actions. Were they designed to result from combined key presses?

Some code seems to be at http://git.sugarlabs.org/projects/paint/repos/mainline/blobs/master/OficinaActivity.py#line136

def key_press(self, widget, event):
    sliders = {65474: -5, 65475: -1, 65476: 1, 65477: 5}
    if event.keyval in sliders:
        self.area.change_line_size(sliders[event.keyval])

  Changed 4 years ago by pgf

sorry. i'm an idiot sometimes. the Fn key won't help here. sugar will respond the same to the Fn version as it does to the non-Fn version, because they produce the same value.

  Changed 4 years ago by erikos

  • cc godiard added
  • owner changed from Quozl to erikos
  • status changed from assigned to new

  Changed 4 years ago by erikos

  • owner changed from erikos to Quozl

Sorry, the assignment was unintentional.

  Changed 3 years ago by martin.langhoff

Confusing. What is the status? Code seems to be in place but is not getting triggered?

follow-up: ↓ 11   Changed 3 years ago by godiard

After the enhacement was implemented, Sugar changed the keybord use, and now F5 and F6 are used for the Frame and the Journal http://wiki.sugarlabs.org/go/0.90/Notes.

We must change the use in Paint.

in reply to: ↑ 10 ; follow-up: ↓ 12   Changed 3 years ago by erikos

Replying to godiard:

After the enhacement was implemented, Sugar changed the keybord use, and now F5 and F6 are used for the Frame and the Journal http://wiki.sugarlabs.org/go/0.90/Notes.

And it went into 0.84 because of the HS keyboard: http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/9e0172214cf53920372178afb47123147c251297

The F5-F8 keys have been always unused on the XO-keyboard, afaik. Apart from that I am not 100% happy they do as well match the journal/frame on the XO keyboard - a bit confusing, but maybe not triggered as often to worry about.

in reply to: ↑ 11   Changed 3 years ago by erikos

Replying to erikos:

Replying to godiard:

After the enhacement was implemented, Sugar changed the keybord use, and now F5 and F6 are used for the Frame and the Journal http://wiki.sugarlabs.org/go/0.90/Notes.

And it went into 0.84 because of the HS keyboard: http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/9e0172214cf53920372178afb47123147c251297 The F5-F8 keys have been always unused on the XO-keyboard, afaik. Apart from that I am not 100% happy they do as well match the journal/frame on the XO keyboard - a bit confusing, but maybe not triggered as often to worry about.

Basically what is discussed in #10341.

  Changed 3 years ago by godiard

  • next_action changed from review to package

I have modified Paint to use the keys "+" and "-" to change the size of the tool.

  Changed 3 years ago by godiard

  • next_action changed from package to add to build

  Changed 3 years ago by dsd

Gonzalo, please state what version you think is fixed. That way I can verify the build.

  Changed 3 years ago by godiard

Version 33

  Changed 3 years ago by dsd

  • next_action changed from add to build to test in build

Test in 11.2.0 build 20

  Changed 3 years ago by Quozl

  • keywords cjbfor9.1.0 removed
  • status changed from new to closed
  • next_action changed from test in build to no action
  • resolution set to fixed
  • version changed from not specified to 1.5/1.0 Software Build os860 aka 10.1.3

Tested in os20, + and - change the size of the tool. Closing.

Note: See TracTickets for help on using tickets.