1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-28 22:49:29 +02:00

36 Commits

Author SHA1 Message Date
James Crook
62f75eb159 (Hi-DPI) No longer upscale ImageCache
I found a couple of problems working with upscaled image caches.

Firstly in GIMP a 'size 4 square pencil' is not 4x4, which makes editing an upscaled image very fiddly.
Secondly the wxIMAGE_QUALITY_NEAREST algorithm is not as dumb as I need it to be, and it is doing some blending when rescaling.  This leads to loss of image quality in some cases.

So when we do switch to Hi-DPI support, we need to be 'all in' and only be downscaling in Audacity, not upscaling too.
2017-05-22 13:46:05 +01:00
James Crook
978f09ba13 Lose unused images from theme. 2017-05-13 18:38:16 +01:00
James Crook
c0f835b67b Add border around theme Images. Do fixups.
Adding an orange border around the images in a theme makes it much easier to cut and paste in the correct position.  I've also expanded the internal images and fixed up a few image details - the pins/bobbins on darker themes, and the light blue rather than dark blue for negative times.
2017-05-04 21:41:18 +01:00
James Crook
e7f95e2be0 A small step towards HiDPI
The image cache that users work with should now have 'pixels' that are 4x4.   This will in time allow us to have large or small versions of all buttons, and also means we have hi resolution images for HiDPI screens.  The actual cost of the extra size should be small, as compression will see lots of repetition.

The main point of doing this now is so that new contributed themes can be HiDPI from the start.
2017-05-04 16:56:32 +01:00
James Crook
9d501f69d6 Add preference for Record being to new track. 2017-05-01 12:04:27 +01:00
James Crook
6102c774ee Bug 1630 - Accessibility of the length/end radio buttons
For Light and Classic themes that use black text, we'll use the length/end buttons because Windows uses black for text.
For Dark and HiContrast themes that use a light colour for text, we'll use the length/end buttons IF the OS is set to use the exact same colour for text.
That for example happens if we use Microsoft's HiContrast2 and our HiContrast theme.

If the OS and theme text colour differ, then if we set blend theme colours option, which is the default, we might still use the OS colour for text in Audacity.  That will happen if the OS colour has decent contrast to our theme's background colour.   Decent is defined as more than 250 difference in RGB values.  If we use the OS colour for text, then we get the proper length/end buttons.

Note that this adds a new feature to the theme blending, in that the text colour will often adapt.  Useful when using custom text colours with HiContrast2.  When the text colour adapts, we will continue to get proper length/end buttons.

Advice to users is to match OS and Audacity themes, and use the blend option.  When themes don't match, it may be desirable to disable blending.
2017-04-28 15:49:02 +01:00
James Crook
e08ceaf099 Add background to numbers on meter, IF meter bar and number colour is too similar.
This happens in Hi-Contrast theme.
2017-04-26 16:28:41 +01:00
James Crook
6bcbe417e9 Make SelectionBar end/length radio buttons behave normally
They had lost the focus/voice-over functionality because I added code to draw them in the
theme colour.  Now I disable that code, IF recolouring is both set and active.  This will happen
for example, if Hi-Contrast is used with the Hi-Contrast system theme.
2017-04-26 15:58:50 +01:00
James Crook
d0bafebfdf Fix posterisation. Add blend themes option.
Posterisation was caused by having a bright theme cache and using a darker theme (in linux) so the light colours 'got stretched' and showed up the relatively few distinct values there.  So the Classic theme is now darker, and we expect (on Windows) that it will be recoloured to windows lighter colours.
2017-04-24 18:33:46 +01:00
James Crook
a868d0c118 Add Hi-Contrast Theme 2017-04-10 12:09:38 +01:00
James Crook
06816684df Recolour light theme if system theme clashes.
On some Linux the default theme has dark grey drop downs, which can't be recoloured (limitation in wxWidgets) and that looks bad with the built in light themes (Classic and Light).  So in these cases the theme's light colour and light buttons get recoloured.

Custom themes and dark theme don't get recoloured.
2017-04-10 08:51:45 +01:00
James Crook
c44e5a281a Add missing include. 2017-04-08 16:26:03 +01:00
James Crook
f508439a42 Recolour Classic theme to wxSYS_COLOUR_3DFACE
This is mainly for Linux which can have a much darker main bar in Classic theme.
2017-04-08 14:49:10 +01:00
James Crook
fefc856901 Update slider in tracks on theme change. 2017-04-05 20:16:12 +01:00
James Crook
c17a7f535e Improve repainting after a theme change.
Now most things repaint properly after a theme change.  The sliders on the tracks don't yet.
2017-04-04 14:43:47 +01:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Paul Licameli
1126925438 Remove naked malloc (or similar) and free in: various 2017-03-17 17:52:54 -04:00
James Crook
545d741eb2 Make Audacity source more like DarkAudacity source. 2016-09-11 13:03:37 +01:00
Paul Licameli
efc0e67934 Theme Preferences, Save Files overwrites all components after asking 2016-05-30 16:30:39 -04:00
Paul Licameli
8d8c7b7f00 Calls to time ruler button creation/update, but it does nothing yet 2016-05-29 12:14:17 -04:00
Paul Licameli
f9da767cbd Remove a friend declaration from Project, privatize a pointer member...
... and make implementation of that pointer a smart one.
2016-04-11 14:42:57 -04:00
Paul Licameli
f00144e9a5 Sweep for filename copying: various 2016-04-10 22:26:28 -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
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
James Crook
3f4a9191ec __WXMAC__ -> __APPLE__ in Theme.cpp #ifdef
This change helps macports and is (apparently) neutral for the platforms we build for.  See:
https://trac.macports.org/ticket/47189#comment:35
2016-02-08 21:47:59 +00:00
Paul Licameli
d703a5b054 travis 2015-07-28 10:21:41 -04: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
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
RichardAsh1981@gmail.com
61de872bf2 Make a large number of global variables static so they only have file scope when that is all they need. Part of a patch by Campbell Barton 2013-09-21 19:30:00 +00:00
james.k.crook@gmail.com
69476e785c Fixed more internationalisation hints. 2012-03-20 15:36:02 +00:00
james.k.crook@gmail.com
0f81cf83a8 Answered question about returning NULL pointer. 2011-11-24 19:34:45 +00:00
v.audacity
2278cdce95 Fix further possible, and comment on definite null pointer derefs per cppcheck. 2011-11-20 07:09:46 +00:00
v.audacity
981366b2b6 Change some magic numbers whose original use was no longer, and get rid of some no-longer-correct comments, for clarity. 2010-07-26 22:37:15 +00:00
windinthew
319903dbf7 CVS > SVN 2010-02-12 14:21:24 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00