Commit Graph

63 Commits

Author SHA1 Message Date
James Crook
ea04eef7e4 Fix Windows button style on Mac toolbar.
Removing audacity.h also removed #define USE_AQUA_THEME
2021-05-17 18:56:03 +01:00
Paul Licameli
406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04: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
60a113da26 Bug 2318 - Time Toolbar is needlessly resized too large when accommodating longer time formats
Tweaks to TimerToolbar.

- When docked, resizer will spring back to right edge when released.
- Now prefers a smaller font, unless bigger is forced.
2020-02-16 11:15:31 +00:00
Paul Licameli
d0a99d5ae5 Each toolbar registers its menu item 2020-02-14 14:51:11 -05:00
James Crook
a09885e995 Fix Big Time TimerToolBar, Stage II
- Naming (Time Toolbar, not TimerToolBar Toolbar)
- Default time format hhmmss
- Lower dock
- Enabled by default
- Sensible min and max font size
- Sensible min and initial width
- Omit Audio Time from Selection Toolbar
2020-02-06 09:40:30 +00:00
James Crook
8168dce551 Fix Big Time TimerToolBar, Stage I
- Update on idle (new idiom from Paul)
- Dock at x1 or x2 size
- Smooth resizing
- Take some account of width when resizing
- Promote Resizable docking code to ToolBar class
2020-02-05 14:24:59 +00:00
Paul Licameli
c3bbdbc50f fix build 2020-02-01 11:44:38 -05:00
Paul Licameli
b7a9e55fa9 New toolbar id at the end of the enumeration, to be safe...
... in case toolbar ids persisted anywhere
2020-02-01 11:30:26 -05:00
Loss
e787694f07 Implementation of Timer Toolbar
PRL:  Rebased onto recent master, fixed compilation and indentation, added new
files to the XCode project, added an EXPERIMENTAL flag
2019-12-31 17:42:54 -05:00
Paul Licameli
54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli
681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
Paul Licameli
582f662404 Bug2172: ruler pin button background should update for theme change...
... It stopped doing so at 1c1aca5

Because the recreating of the ruler's button now happened earlier than for
the several toolbars, not later, but there was a side-effect on the theme
that the toolbar updates did, that the ruler relied on, namely the updating
of button background images.

Now ruler also invokes that step.

(But wouldn't it be better to do that update in just one place?  I am not
sure what that place should be.  ThemeBase::LoadPreferredTheme?)
2019-07-23 02:07:00 -04:00
Paul Licameli
c6f24d864b Construct all toolbars with back-reference to the project...
... and eliminate many uses of GetActiveProject
2019-06-12 20:52:36 -04:00
Paul Licameli
e6d7a72a73 Registration of toolbar factory functions...
... reduces direct dependencies of ToolManager.cpp.

This frees four files from cycles:
DeviceToolBar
EditToolBar
MeterToolBar
MixerToolBar

Leaving 66 files still in the big s.c.c.
2019-06-12 16:01:53 -04:00
Paul Licameli
62899a32f4 All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
2019-05-20 21:38:13 -04:00
Paul Licameli
2e1fe80601 Remove or comment wxPanelWrapper.h in headers 2019-04-04 10:13:23 -04:00
Paul Licameli
bcc2e0d13b Remove wx/frame.h, wx/sizer.h, wx/access.h from headers 2019-03-28 11:21:15 -04:00
James Crook
f07e40a4c0 Bug 1983 - Preference updates do not preserve toolbar widths 2018-09-20 13:16:09 +01:00
James Crook
132986de1a Make Transcription ToolBar resizable.
I moved 'Fit()' from ToolBars into MeterToolBar, because it is a workaround for an incorrect size calculation by MeterToolBar.  MeterToolBar is sized as if there is no resizer, so when there is one, the toolbar needs to be expanded (using Fit) to accommodate the resizer.

I also set the min size of MeterToolBar to 150, so that some meter will appear, even if Toolbar shrunk to the minimum.
2018-07-21 16:41:32 +01:00
James Crook
b792094b53 Bug 1710 - The Incredible Shrinking ToolBar
The worst symptoms of this are fully fixed.
1: The device info now uses all the space in the toolbar, no matter how the toolbar is resized.
2: The undocked toolbar can now be moved around repeatedly without changing size at all.

There is a small residual - a much toolbar size change of a few pixels on docking.  The contents though still fit nicely.  The 'incredible' part of this bug is gone.  I'd like us to close this bug as the residual of a few pixels change in the toolbar size on repeated docking and undocking scarcely matters.
2018-04-08 19:51:10 +01:00
James Crook
b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
Paul Licameli
9b7ccc4dff Use TranslatedInternalString for tips of toolbar buttons 2018-03-15 20:13:19 -04:00
Paul Licameli
6967925e48 Redo CommandManager::DescribeCommandsAndShortcuts with pairs...
... Later we may make other types for the members of that pair.
2018-01-08 14:14:22 -05:00
James Crook
41ac4cd47a Add Hover-Over-Down State for Button
Previously hovering over a down button made no difference.
Also tweaked the appearance of hover-over thumbs on dark theme sliders.
Also tweaked hover images and colours generally.

Classic retains the old style.
Hi Contrast does not distinguish between hover-up and hover-down.
2017-12-14 14:39:56 +00:00
Paul Licameli
31231a54d2 use override 2017-11-05 21:01:52 -05:00
Paul Licameli
9612e3d971 indentation, final newlines, spelling, remove unused members 2017-11-05 21:01:38 -05:00
Paul Licameli
731a2ac40c Fix format of tooltip text for toolbar buttons in RTL languages...
... No translatable strings were added, two were removed
2017-09-11 22:08:06 -04:00
Paul Licameli
5d5edecca5 Remove unnecessary semicolons 2016-09-18 10:36:53 -04:00
Paul Licameli
32f24eabb2 Review uses of safenew...
... add comments and assertions, and use make_unique instead where possible
2016-08-13 23:16:05 -04:00
Paul Licameli
c438925a22 Use Destroy_ptr for the toolbars 2016-08-10 11:05:51 -04:00
Paul Licameli
9dfa646221 Bug1430: Don't crash resetting toolbars with legacy .cfg files 2016-07-03 05:05:01 -04:00
Paul Licameli
4739f3e27b Compensate for wxW 3 tab navigation deficiencies on Mac...
... using char hook event handlers.  We don't need to go the extreme length
of patching wxWidgets source.
2016-06-25 19:14:05 -04:00
Paul Licameli
e844b07a46 All Toolbars define RegenerateTooltips; invoke during project init...
... and UpdatePrefs
2016-06-12 00:00:04 -04:00
Paul Licameli
5f8fad4a48 Transport button tooltips with shortcuts use Mac special chars 2016-06-12 00:00:03 -04:00
Paul Licameli
64ad732aee Removed some unused members, made some members const 2016-06-11 16:31:38 -04:00
Paul Licameli
82cf9b3ab6 Don't increase width when a toolbar is repeatedly docked and undocked 2016-06-11 16:29:25 -04:00
Paul Licameli
f5c4c85653 New scrubbing toolbar; remove ruler pushbuttons. 2016-06-05 01:03:24 -04:00
Paul Licameli
fbf09d2130 Make ToolBar button setup functions public and static 2016-06-01 11:50:34 -04:00
Paul Licameli
7d265dc3d4 Oops, revert unready work
Revert "new button images for time ruler"

This reverts commit 26ec0100a2.

Revert "add button"

This reverts commit af5163025a.

Revert "ToolBar::MakeButton is public and static"

This reverts commit 668714942b.
2016-05-29 12:13:24 -04:00
Paul Licameli
668714942b ToolBar::MakeButton is public and static 2016-05-28 22:55:15 -04:00
Paul Licameli
9ab0e42f29 Control scrub with motion, click, drag, wheel almost anywhere in main window...
... if the event is not handled and skipped by sub-windows first, such as for
toolbar button clicks.

(But track panel clicks are skipped even after doing something, so they may
also cause seeking besides other responses.  So click can seek AND set cursor.)

This is meant to make drag to seek and wheel for change of speed easier,
without needing to keep the mouse in the narrow time ruler.

Also lets you click in the ruler, then move in any direction, and not miss the
motion event that should start the scrub playback.

The event handling is a bit of a hack, using propagation.  It does not use
capture.
2016-04-26 12:12:06 -04:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Leland Lucius
93aeca9a48 Fix for bug #1203 2015-09-16 13:08:03 -05:00
lllucius
9bbc261321 Attempt #2 at taming the meter toolbars
It corrects several "multiple project" problems with the
meter toolbars and meters.

In addition, there was a "multiple project" issue where
the transport buttons didn't disable properly in the
non-active project.
2014-12-19 16:38:56 +00:00
lllucius
64afdbb508 A couple of meter orientation fixes
1)  On startup if the capture meter is vertical and
    the playback meter is horizontal, capture meter
    would jump to horizontal if you start monitoring.

2)  To cut down on meter orientation weirdness, the
    orientation is now mirrored in both meters when
    it changes.

    If this is not a desired behavior then the only
    option would be to have separate config file
    settings for each meter.  That means that the
    orientation settings in meter preferences will
    correspond to that meter only.

    Let me know if this is what is wanted.
2014-12-18 07:48:33 +00:00
lllucius
2f177032ed Fix the weird mouse pointer behavior over toolbar resizers
I couldn't handle it anymore.  The darn pointer would seemingly
switch to left/right arrows whenever it felt like it...and stay
that way.

Actually, it was when it passed over the toolbar resizer when
docked.  The problem was that it wouldn't change back to a normal
pointer because it didn't have the events it needed to do that.

So, I moved the resizer logic into it's own window and now the
pointer changes like it should.

As a bonus, we get a tooltip so the user will know what to do
when the pointer changes as it passes over the resizer.
2014-12-11 08:05:11 +00:00
james.k.crook@gmail.com
7324997db6 Fix for http://bugzilla.audacityteam.org/show_bug.cgi?id=643 "Residual consistency issues with SHIFT showing Loop Play button icon" by Paul Licameli.
* Loop play-at-speed and cut preview play-at-speed implemented.
* Shift or ctrl down now affect all relevant buttons, loop or cut preview, normal or at speed, and append-record.
2014-11-29 17:22:05 +00:00
james.k.crook@gmail.com
7ee3c47441 Added Space-Saver meters. These are now the default.
Fixed ResetToolbars so that SpectralSelectionBar is not shown after a reset.
2014-11-09 15:47:09 +00:00