1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-23 14:45:51 +01:00
Commit Graph

324 Commits

Author SHA1 Message Date
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
James Crook
4267ba0490 Bug 2473 - Linux: Numbers on meters have opaque backgrounds 2020-06-09 16:36:15 +01:00
Paul Licameli
fa4d35296e AllThemeResources.h has a .cpp & doesnt include Theme.h...
... (it used to, via MacroMagic)

This splits a cycle of 8 into 6 + 1 + 1
2020-05-28 05:50:24 -04:00
James Crook
4884f59982 Bug 2316 - Meter scale overprints meter options button 2020-03-02 19:29:48 +00:00
James Crook
a48483bc19 Bug 2298 - Font size per-platform.
My previous fix disrupted mac font size.  Now the code should have the right font sizes for each platform.
2020-02-25 10:56:31 +00:00
James Crook
87034a0a67 Bug 2298 - Windows: Font size reduced for Vertical Scale, Timeline and Time Track numbers 2020-02-24 19:25:52 +00:00
Paul Licameli
68281fe0ee Split up Ruler::Updater::Update 2020-01-23 13:53:54 -05:00
Paul Licameli
580ad8221e Mutable cache for ruler updates, so Draw functions can be const 2020-01-23 13:51:12 -05:00
Paul Licameli
a2babc646f Use the correct font to find lead size for custom fonts 2020-01-23 13:39:22 -05:00
Paul Licameli
99064d6dd5 Mutable cache for Ruler's chosen fonts 2020-01-23 13:35:32 -05:00
Paul Licameli
21306d6186 Remove indirection storing number scale in Ruler 2020-01-23 13:27:05 -05:00
Paul Licameli
fec3b11674 Demote more of the ruler updating procedure into Updater 2020-01-23 13:18:47 -05:00
Paul Licameli
fe4db0dd8e Nix Ruler member vars used only for grid drawing; more const methods 2020-01-23 12:56:11 -05:00
Paul Licameli
537ace493e Don't draw 0 at top of spectrogram scale (bug in 8cf7d0b) 2020-01-22 19:58:53 -05:00
Paul Licameli
ec723466ba Invalidate Ruler, whenever anything the Updater uses is reassigned 2020-01-22 13:38:37 -05:00
Paul Licameli
edba1b5b28 Avoid unnecessary update before drawing ruler grid...
... which matters for some displays such as in Equalization, though not for
track vertical rulers
2020-01-22 13:38:36 -05:00
Paul Licameli
b0154f89e0 Move Tick and TickCustom methods to temporary worker structure...
... which forces us to be more explicit about just what parts of the Ruler
state are used in it (when we construct it) and be sure they don't modify it
2020-01-22 13:38:34 -05:00
Paul Licameli
8cf7d0b8e9 Make Ruler::Tick and TickCustom const member functions...
... on the way to making them not (direct) member functions of Ruler.

Hoist the choice of font and destination label array out of them, and
group other outputs into an argument.
2020-01-22 12:51:08 -05:00
Paul Licameli
2c0afdd77a TickSizes::LabelString takes one less argument...
... so that Ruler::Tick uses major in one less place
2020-01-22 12:09:52 -05:00
Paul Licameli
80dd2fbec9 Further factoring of font size setting...
... and fix uninitialized lead size in case of user-supplied fonts (though
this capability isn't yet used anywhere)
2020-01-22 12:09:52 -05:00
Paul Licameli
e08543650b Factor function to choose ruler fonts 2020-01-22 12:09:52 -05:00
Paul Licameli
3876031669 Group ruler fonts and lead into a structure 2020-01-22 12:09:52 -05:00
Paul Licameli
80f884b0b7 Don't need extra indirection handling wxFont, see documentation of it 2020-01-22 12:09:52 -05:00
Paul Licameli
05c80cfb4f narrow scopes of loop indices 2020-01-22 12:09:52 -05:00
Paul Licameli
605a4056c9 Fix bug in 3a64b17...
... which make, for instance, excessive tick marks when in Mel spectrogram
scale
2020-01-22 12:08:37 -05:00
Paul Licameli
a14d5c348a Eliminate Ruler::mDC 2020-01-21 19:58:05 -05:00
Paul Licameli
3a64b172c8 Demote duplicated code in Ruler into a static function 2020-01-21 19:36:02 -05:00
Paul Licameli
8729f3fb8e Simplify Ruler with std::vector members 2020-01-21 16:07:27 -05:00
Paul Licameli
7682961f53 Remove unused members of Ruler 2020-01-21 15:17:51 -05:00
Paul Licameli
a84391b4a2 Eliminate some members from Ruler...
... Move some fields used only during formatting into a temporary structure.

(And fixing a minor problem with uninitialized variables in case of logarithmic
scale, which made it unpredictable how Plot Spectrum with logarithmic
frequencely axis formatted numbers.)
2020-01-21 12:53:33 -05:00
Paul Licameli
9cd7a5eaf3 Bug2277 partial: in dB ruler, always draw midline value if in range...
... and also draw the zeroes if in range, taking precedence over the extreme
values (which might be positive dB values when zoomed out or scrolled).

See comments 10 and 11 in the bug report.
2020-01-20 12:29:28 -05:00
Paul Licameli
6e14d2e56c RulerPanel uses TranslatableString for units string...
... also fixing missed translation of "k" in spectrum vertical ruler
2019-12-28 23:49:18 -05:00
James Crook
5a3e9cd063 Fix dialog naming
For nicer Doxygen results, we need consistency in naming of classes.
Dialag classes are now called SomethingDialog.
2019-12-06 10:39:07 +00:00
Paul Licameli
46bf5a82fc Don't pass whole TimeTrack to Ruler or Mixer...
... they need only the information in a (Bounded)Envelope.
2019-06-10 20:48:38 -04:00
Paul Licameli
ac04a34d42 Move #include of Experimental.h upward in two files 2019-06-02 14:03:32 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
51f0362e9f Remove wx/wx.h from headers 2019-03-26 11:17:41 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
e6324e86ac Fix cross-platform one-pixel differences in line drawing...
... Make all line drawing go through our AColor which wraps the wxDC
line-drawing functions.

Despite what wxWidgets documentation says, the functions still don't
consistently include the first point and omit the last point of a line.  I
observed inclusion of both on Mac, while on Windows, omission sometimes of the
first point instead of the last.

Discrepancies could be observed in 2.3.0 between Windows and Mac, using the
Window magnifier or command+alt+ +, zooming in closely on the ends of the
shadow lines below and right of tracks, or at the bottom-right corners of the
bevels drawn around vertical rulers.

So where there is an observable one-pixel difference of drawing between
platforms, there is the question, which was the intent when the drawing code
was written?  Should the coordinates be corrected by one or not?

I reviewed each case and used my judgment.

Most of the calls are in drawing rulers.  Major tick lines were drawn five
pixels long, and minor, three, on Mac.  I keep this behavior, but you might
argue for making them four and two.

On the other hand the drawing of ruler grid lines, which you can see in
the equalization and frequency analysis windows, did need a one-pixel correction
to avoid straying out of bounds.
2019-03-16 07:51:28 -04:00
Paul Licameli
06b3b42794 Remove unnecessary initializers for empty wxString 2019-03-15 15:18:11 -04:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
Paul Licameli
303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
Paul Licameli
903b42f84a Transport Menus 2018-10-24 12:16:35 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
e724ef0793 Bug 1970 - Missing tick marks in Timeline 2018-09-09 12:33:10 +01:00