Commit Graph

65 Commits

Author SHA1 Message Date
Michael Gregorius
461cb2bb3c Improve the rendering of melody patterns (mapped to [0,1] x [0,1])
Compute the height of the potential text field before rendering the
melody pattern so that we can use that information later.

Transform the painter so that notes drawn into a [0,1] x [0,1]
coordinate system are drawn at the correct position on the pattern
widget. Add code that moves the pattern notes smoothly under the text
label in case there is not much space, i.e. for narrow patterns. Notes
are drawn as filled rectangles with a slightly darker border.

Always draw at least an octave of notes onto the pattern, so that
patterns with just a single note will not look strange, i.e. that they
are not filled completely with the note. If there is additional space to
fill it will be rather filled at the top of the pattern so that single
notes have a high chance of being drawn below the pattern text.

Simplify the drawing of the inner and outer border.

Use numeric_limits to initialize the minimum and maximum key.

Remove some redundant checks whether the pattern holds notes and
decrease the indentation depth by two tabs for most of the code.
2017-07-26 20:39:50 +02:00
Michael Gregorius
c1be21f478 First implementation to draw pattern notes as boxes
Still uses absolute positions without any transformations. Some
refactorings/changes to make the code better understandable and concise.
2017-07-26 20:39:50 +02:00
Michael Gregorius
a23e344886 Make text rendering consistent for TrackContentObjectViews
Add the method paintTextLabel to TrackContentObjectView. This methods
implements the painting of a given text on a given painter. The new
implementation does not draw any text label in case the trimmed text
becomes empty.

Use the method paintTextLabel to paint the text for automation patterns,
BB patterns and instrument patterns.

Adjust the style sheet of the classic and default theme by moving the
font definition from PatternView into TrackContentObjectView so that it
can be used by all inheriting classes.
2017-07-20 19:53:02 +02:00
Michael Gregorius
b7b2204cbb Remove unnecessary assignments to pixmaps in TCOs
Simplify the code that reinitializes the pixmap that caches the
graphical representation of some TCO widgets.

See comment in issue #3699.
2017-07-15 15:27:11 +02:00
Hyunin Song
cc3822141e Merge branch 'stable-1.2' into master (@liushuyu) 2017-07-15 08:08:07 +09:00
Michael Gregorius
a70d255418 Use font properties from CSS to draw the pattern labels
Use the font properties that are defined in the CSS to draw the pattern
labels. This provides flexibility with regards to the font properties
that are used (size, font family, etc.).

Adjust the CSS for the default theme and the classic theme.
2017-07-11 21:23:13 +02:00
Michael Gregorius
c0a4f67544 Render a black semitransparent rectangle beneath the elided pattern text
Make the pattern names better readable by rendering them on top of a
semitransparent black rectangle. Elide the text and make it render a bit
more to the right.
2017-07-11 21:23:13 +02:00
Oskar Wallgren
082dbed8e9 Revert "'Off beat' beat notes to MelodyPattern"
This reverts commit e4474af091.
2017-05-01 22:15:55 +02:00
Lukas W
29f832034a Remove unused includes (#3429) 2017-03-16 11:35:18 +00:00
Oskar Wallgren
e4474af091 'Off beat' beat notes to MelodyPattern 2017-02-27 08:17:24 +01:00
Oskar Wallgren
2c8e9a0957 visible beat notes in MelodyPattern 2017-02-20 13:33:58 +01:00
Oskar Wallgren
f367604af7 No extra bar with beat note near end 2017-02-09 02:46:47 +01:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Karmo Rosental
995b14f7b5 Fixed #3226. Beat velocity fixes for both themes. (#3229)
* Fixed #3226. Fixed beat velocity on classic theme. Fixed visual difference between 0 velocity and no step.

* Render step_btn_on_0.png always.

* Removed useless if.
2017-02-03 22:35:23 +01:00
Umcaruje
1eded63a19 Standardize the color of TCO bar markers (#3054) 2016-09-29 15:05:37 -07:00
Karmo Rosental
70a5ee41ba Fixed showing of velocity of steps. (#2960)
* Fixed showing of velocity of steps.

* More contrast between muted and unmuted steps.

* Corrected opacity of volumes over 100.

* Single pixmap draw per step and step opacity is calculated using sqrt function.

* Using step_btn_on_100.png created by Umcaruje.
2016-09-28 17:44:28 +02:00
Javier Serrano Polo
41b930eb66 Update Pattern and AutomationPattern length (#3037) 2016-09-17 23:51:00 +00:00
Javier Serrano Polo
1f90337523 Drop notes with length zero (#3031) 2016-09-12 20:10:18 +00:00
Javier Serrano Polo
08d54d3179 Fix sample track view in BB editor (#3002) 2016-09-04 00:16:43 +00:00
Umcaruje
4b6bffc376 Cloning the pattern should duplicate it (#2972) 2016-08-17 23:02:26 +02:00
Oskar Wallgren
54a9aa6087 tickspertact -1 (#2959) 2016-08-07 14:39:45 +02:00
Umcaruje
b8f5f21177 Make the background of BB patterns themeable (#2942)
* Make the background of BB patterns themeable

* Lighten up the color, make the BB background borderless
2016-08-02 14:45:45 +02:00
Javier Serrano Polo
e0bab1ef73 Resize only patterns from BB editor 2016-07-14 20:24:02 +02:00
Stephen Seo
892970d15b Fixes newly added tracks in BB having wrong size 2016-07-04 20:28:56 +09:00
Oskar Wallgren
fa0c26e403 Clone steps in context menu 2016-04-10 01:19:45 +02:00
Umcaruje
23cd3002a6 Grey out muted patterns in the BB editor 2016-03-19 00:29:59 +01:00
Umcaruje
6a10cb184d Fix regression caused by fcec8dd 2016-03-10 16:06:59 +01:00
Umcaruje
fcec8ddd02 Fix BBtrack updating; Fix the Pattern tooltip 2016-03-09 16:59:19 +01:00
Umcaruje
f136ba3097 Refactor the drawing of TCO's; Get rid of hardcoded colors in TCOs; Make TCO gradient configurable; Even out the color scheme
Thanks to @Fastigium for helping with the BB Pattern redraw problem
2016-03-02 21:58:27 +01:00
Umcaruje
2dd403e53b Rename note volume into note velocity 2016-02-08 19:55:44 +01:00
Tres Finocchiaro
3f6e406eb6 Fix double click to open BBEditor PianoRoll
Fixes #2431
2015-10-30 16:44:14 -04:00
Dave French
362e0e1962 Edit BBEditor Mouse tool tip
Edit the tool tip to remove The Double click top open in piano roll
as per #1776 #1783
2015-07-20 00:00:32 +01:00
Colin Wallace
81164e91a9 Correct filenames within documentation strings 2015-06-15 23:52:13 +00:00
Dave French
ca414dab10 Added option to duplicate first bar, in BBEditor
Added a new button to the action bar, using step_btn_duplicate.png

The new button, aswell as adding a bar to the patten, then
copies the first bar to the last.

fixes #457

BBEditor Duplicate Pattern. updated image, changed function name

Have updated the new image step_button_duplicate.png

Renamed the function from duplicateFirstBarAtEnd to duplicateSteps.

BBEditor renamed function duplicateSteps

renamed duplicateSteps() to cloneSteps() as requested

BBEditor rechange duplicateSteps to cloneSteps

BB Editor changed actionBtn text from duplicate to clone
2015-03-11 21:50:44 +00:00
Dave French
6ad5d88c08 Reinstate Double Click opening the piano roll from song editor
This fixes a bug introduced when removing double click from
BB patterns. It Now checks if we use fixedTCO's (bb tomb stones),
only disable double clikc if so, leaving it working correcly in the
song editor
2015-03-01 14:37:07 +00:00
Dave French
448f5be350 Removed Double click to open piano roll, in the BBeditor, this is to stop notes being added in error 2015-02-24 22:08:46 +00:00
Dave French
57460c91c3 bb patern 2015-01-27 00:28:40 +00:00
Amadeus Folego
8267ac6316 Fix beat pattern actions on melodies 2015-01-22 17:18:42 -02:00
Amadeus Folego
f0b2d8b0af Fix export crashes adding gui checks 2015-01-13 01:51:27 -02:00
Lee Avital
7da4efda0f Implement 1429 -- move to next and previous pattern 2015-01-12 20:28:13 -05:00
Lukas W
56055b36b0 Merge branch 'master' into ed_refac
Conflicts:
	src/gui/editors/PianoRoll.cpp
2015-01-11 13:25:55 +01:00
Jonas Trappenberg
87e597510c Minor refactorings and codestyle cleanup. 2015-01-11 00:05:25 -08:00
Tres Finocchiaro
86c2673398 Merge pull request #1563 from DanWin/resize-cursor
Don't display resize cursor for non-resizable TCOs
2015-01-10 09:32:09 -05:00
Amadeus Folego
1dbc44a7f0 Refactor redundant pattern color assignment
Instead of creating a new QColor for each condition just use the
`setRgb` method or fix the conditions order.
2015-01-08 14:37:10 -02:00
Lukas W
7f2f9f2685 Merge branch 'master' into ed_refac 2015-01-08 10:49:09 +01:00
Amadeus Folego
421c071ab0 Fix muted track not highlighted on selection
Fix #1239
2015-01-07 15:55:58 -02:00
Lukas W
748cccd266 Merge branch 'gui_application' into ed_refac
Conflicts:
	src/core/Song.cpp
	src/gui/MainWindow.cpp
2015-01-07 00:03:32 +01:00
Lukas W
23e0e0fb8e Merge branch 'master' into ed_refac
Conflicts:
	include/AutomationEditor.h
	include/SongEditor.h
	plugins/delay/delaycontrols.cpp
	plugins/delay/delaycontrolsdialog.cpp
	src/gui/editors/AutomationEditor.cpp
	src/gui/editors/BBEditor.cpp
	src/gui/editors/PianoRoll.cpp
2015-01-06 23:05:13 +01:00
Daniel Winzen
01fac0d342 Add default behaviour to switch 2015-01-06 18:50:51 +01:00
Daniel Winzen
7440794597 Don't display resize cursor for non-resizable TCOs 2015-01-06 18:18:16 +01:00