Commit Graph
38 Commits
Author SHA1 Message Date
itsmattkc 51064f44f5 slider: use cursor-less drag when no multipliers are active 2021-04-13 23:47:58 +10:00
Simran fca485bd69 Fix plural handling for translations (#1424)
* .arg() doesn't handle plurals, replace %1 with %n and pass number to tr(), but only if there is an accompanying word for that we want singular/plural translations and only for whole numbers.

* Qt's translation methods only accept integers and we don't know what grammatical number form would be correct for floating-point numbers in different languages anyway.

* Add optional 2nd argument to SliderBase::SetFormat() to activate deferred plural handling:
  SetFormat(QT_TRANSLATE_N_NOOP("olive::SliderBase", "%n unit(s)"), true)

* Generate en_US.ts with lupdate's -pluralonly option. Only source strings that require plural handling need to be translated (as long as the source language is American English).
2021-04-13 00:58:46 +02:00
itsmattkc 02b21a22aa slider: start listening to mouse input only after positioning 2021-04-08 09:49:21 +10:00
itsmattkc 2adb6447a1 slider: improved dragging behavior when min/max are set 2021-04-01 17:08:18 +11:00
itsmattkc a4ba2ee019 slider: fixed crash 2021-03-25 22:47:50 +11:00
itsmattkc 0c73a4bd59 made slider value/string conversions abstract 2021-03-15 18:29:03 +11:00
itsmattkc acb8c6865a implemented offsets into sliders 2021-03-15 18:23:00 +11:00
itsmattkc c6a2349ad6 improved slider ladders 2021-03-15 13:43:04 +11:00
itsmattkc 75d4cd899b use hardcoded namespace
The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
2020-11-17 20:24:42 +11:00
itsmattkc d241090a9f finally updated the copyright year 2020-11-17 20:13:22 +11:00
itsmattkc e2010dde83 made formal QtUtils class 2020-11-17 09:42:36 +11:00
itsmattkc 115e62f140 slider: further behavior improvements
Ladders appears offset on sliders with multipliers. Ladder also appears
on initial press (but still shows line edit if mouse wasn't moved)
2020-06-18 18:58:49 +10:00
itsmattkc e47c985baa slider: if a ladder appears, signal the label that the drag has finished 2020-06-18 16:30:36 +10:00
itsmattkc c5dd406ff1 slider: improved ladder usability 2020-06-18 14:11:50 +10:00
itsmattkc 41fc50f412 slider: initialize dragged diff to 0
Fixes undefined behavior on first drag of a slider.
2020-06-16 02:51:35 +10:00
itsmattkc 4c548bc6a5 slider: implemented value ladder
Allows finer control over value changes.
2020-06-14 03:56:18 +10:00
itsmattkc 14ac1ada6e various: adding files missing in last commit
Oddly some files didn't commit previously. This commit adds those.
2020-05-27 03:24:37 +10:00
itsmattkc d653070a9d slider: reviewed and conformed code 2020-05-09 18:53:00 +10:00
Thomas Wilshaw cb1127936a Implement Alt Click to default on sliders
The following sliders now have Alt Click functionality:
 - Nodes (What it's initialy set too or 0 if not)
 - Export Dialog Dimensions~ (Defaults to Sequence width/height)
 - Export Compression Settings~
    - Advanced (0)
 - Speed/Duration
    - Speed (100%)
    - Duration (clip length)
 - Stream Properties Image sequence
    - Start Index (1)
    - End Index (sequence length)

Sliders with no default value set ignore an Alt
Click.

Added SliderBase::SetDefaultValue() which sets the
default value of a slider.

Added ValueReset() to SliderBase signals which is
called if a slider is Alt Clicked on. Only updates
if default_value_ is not Null.
2020-05-07 22:14:37 +01:00
itsmattkc db117e0780 mathnode: increased decimal places
Also includes general improvements to the slider widget such as an optional
"autotrim" function to cut off trailing zeroes, a "format" string that's easier
to internationalize, and general tidiness.
2020-04-22 17:49:32 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc 94f1d997ad slider: don't use prefix and suffix in text entry
UX improvement, ensures the text entry doesn't include anything that the slider
can't resolve back into a value.
2020-02-21 00:11:54 +11:00
itsmattkc 17c1493aa7 all time-based panels are now derived from a common base class
Cuts down on a lot of duplicate code between
TimelineWidget/ViewerWidget/CurveWidget/NodeParamView
and TimelinePanel/ViewerPanel/CurvePanel/ParamPanel since they all use similar
time functions.
2020-02-01 19:39:43 +11:00
itsmattkc 7df52b7fd5 added disk preferences pane and the ability to set the disk cache location 2020-01-09 15:51:59 +11:00
itsmattkc fe3c155b98 sliders now have feedback on whether they're being dragged or not 2019-12-27 04:15:27 +11:00
itsmattkc cde668b590 implemented percentage and decibel view modes for slider
A slider can now hold a float value and display it in the UI converted to
either a percentage or a decibel (still returning a linear float value
programmatically for the rest of the code).
2019-12-18 02:09:53 +11:00
itsmattkc 29ae366659 improved speed/duration implementation
This functionality is almost complete minus the reverse speed and any of the
audio implementation.
2019-12-18 01:19:17 +11:00
itsmattkc 4ddeadaf46 fixed regression in slider
The recent slider focus addition caused the label to re-focus if the user
pressed enter in the line edit, causing the line edit to never disappear.
2019-12-16 03:00:26 +11:00
itsmattkc d6d8409bb9 allow sliders to be tabbed to 2019-12-15 20:03:02 +11:00
itsmattkc 2207aa3fd5 moved slider's focusable line edit to a separate distinct reusable widget
Some of the widgets designed for Slider have uses elsewhere so now they have
been moved to allow more generic usage.
2019-12-08 15:13:55 +11:00
itsmattkc dd8d1e84b0 small visual improvements to the timeline's timecode label 2019-12-08 00:24:50 +11:00
itsmattkc f2013a6f3d created time slider UI widget
Based on the integer slider, this can be used to interactively control time.
2019-12-08 00:11:47 +11:00
itsmattkc 833d1f7d94 fixed bug where slider widget would signal that it had changed twice
When typing a slider value, it would always signal that it had changed twice.
This is obviously unnecessary and is fixed in this commit.
2019-11-17 13:49:40 +09:00
itsmattkc ba7a10177f fixed various caching issues when rapidly changing values 2019-09-09 04:07:51 +10:00
itsmattkc 99dc51dbbe fixed slider not updating when dragging 2019-09-08 12:19:28 +10:00
itsmattkc 33ad6fba90 slider signals value change on drag 2019-09-08 09:14:53 +10:00
itsmattkc f2972651af several adjustments to node caching system 2019-09-02 11:29:50 +10:00
itsmattkc ff02b41cdc added slider widget 2019-08-31 16:55:57 +10:00