Permalink
Commits on Sep 28, 2016
  1. Color selector: switch to pdColorWheel

    Eventually, the goal is to make both sides of this dialog user-swappable
    (with support for swatches and other color selection methods), but for
    now, I just want to migrate everything to a theme- and
    high-DPI-compatible implementation.
    
    Converting the left-hand side to an existing control is an easy way to
    jumpstart this.  Among other benefits, redraw speed is vastly improved
    over the old system.
    committed Sep 28, 2016
Commits on Sep 27, 2016
  1. Updated German language file

    c/o Roy K.  Thank you, Roy!
    committed Sep 27, 2016
  2. Minor bugfixes

    This commit fixes minor rendering issues of button tooltips (the font
    object needs to be manually reset to left-alignment), and the main
    canvas at program shut down (it was incorrectly suspending rendering at
    the wrong shutdown phase).
    
    Also, I've confirmed that the source of user object leaking at shutdown
    is the self-subclassing class.  I've been meaning to switch to the
    standard common-control-based subclasser, and this provides a good
    reason to do it sooner rather than later.
    
    Such a switch first requires a rewrite of the color selection dialog
    (which currently uses a bunch of outdated control approaches,
    incompatible with the new subclasser), but that's not a bad thing as I
    needed to redesign the color selector anyway to make it theme- and
    high-DPI-compatible.
    
    In the meantime, this commit makes some additional minor subclassing
    changes to prepare for the rewrite.
    committed Sep 27, 2016
  3. Fix color wheel rendering

    committed Sep 27, 2016
Commits on Sep 26, 2016
  1. Continue expanding pdDebug tracking capabilities

    Timers and hooks are now tracked internally, and a number of functions
    have been hardened against potential errors.
    committed Sep 26, 2016
  2. pdDebug: start implementing more detailed leak detection

    I'm detecting weird user object spikes at program shutdown, which is
    possibly indicative of a deeper problem.
    
    In this commit, I've increased tracking detail of program-created icons
    and API windows, both of which look good according to internal tracking.
    (This did turn up a minor leak with custom form icons, which has been
    rectified.)
    
    I've also fixed some tracking issues with edit boxes created at
    run-time, and hardened a number of internal functions against possible
    IDE-related issues.  Still haven't found the source of the shutdown user
    object spikes, but I'll continue looking.
    committed Sep 26, 2016
Commits on Sep 25, 2016
  1. Fix tooltip parsing errors in lang file generator

    Using the word "tooltip" in an end-of-line comment was breaking the
    parser; oops!
    committed Sep 25, 2016
  2. Tooltips: improve positioning algorithm

    Tooltips are now correctly moved on-screen, as necessary, and their
    position is automatically placed as close to the mouse's hover position
    as physically possible.
    
    (Another UI project down!)
    committed Sep 25, 2016
  3. Master UI class: free DCs after controls raise a redraw request

    There's no penalty to doing this, as DCs are autogenerated as needed.
    There is a nice benefit, however, if a control requests a redraw, but
    the system doesn't generate an immediate paint event (because the
    control is hidden, for example).  This is particularly useful at startup
    time, as many controls are initialized, but not ultimately displayed
    on-screen.
    
    On a cold start, this reduces GDI object count by 245.  The resulting
    count is less than not just PD 6.6, but PD 6.4 as well.
    committed Sep 25, 2016
  4. Tooltips: restore translation support

    Also, purge the old pdTooltip class, which is no longer needed as the
    master user control support class handles tooltips now.  (Windows system
    tooltip code is no longer required.)
    committed Sep 25, 2016
  5. Restore GDI DC tracking

    Not sure when this disappeared; now it's back, at least!
    committed Sep 25, 2016
Commits on Sep 23, 2016
  1. pdTooltip: implement rendering

    Tooltip positioning still needs to be optimized (for example, no checks
    are currently performed to prevent displaying off-screen), but tooltip
    window management and rendering are finally working well.  (Translations
    are not yet applied, but that's a quick fix.)
    
    Also note that so far I've only tested Win 10.  Things may be weird on
    XP and/or Vista; testing them is TODO.
    
    This was the single largest remaining item on the "reduce user and GDI
    object" checklist.  Standard Windows tooltips leak like a sieve when
    intermixed with self-subclassing VB methods (because tooltips also
    subclass their target objects, and their common-control-based
    subclassing does not play nicely with Paul Caton's approach).  Just the
    *assignment* of a tooltip resulted in the creation of a user object and
    two GDI objects, and those resources could potentially leak any time a
    tooltip was displayed or changed.  (As noted in previous commits,
    changes to the Title property of a tooltip would cause an additional
    *4-6* GDI objects to leak!)
    
    Thus, switching to a custom tooltip implementation is a big deal.  By my
    accounting, this cuts cold-start user objects by ~150 (662 to 514), and
    GDI objects by nearly ~200 (1278 to 1081).  This is a lower user object
    count than PD 6.6 (626) and a GDI count that is nearly *half* of what it
    was in 6.6 (1081 vs 1981).  And all this despite moving to a fully
    owner-drawn UI, with double-buffering for all display elements.
    committed Sep 23, 2016
Commits on Sep 22, 2016
  1. pdTooltip: get basic show/hide behavior working

    Any time we're forced to mess with window bits at runtime, the potential
    for crashing skyrockets.  AFAICT, this commit nails down the proper
    order and set of changes required to raise a tooltip-like window without
    stealing focus, screwing up z-order, or causing VB to throw a hissy fit.
    
    Next up is calculating ideal display position, based on the mouse
    position, underlying control, and actual tooltip text.
    committed Sep 22, 2016
Commits on Sep 20, 2016
  1. PD controls: implement mouse hover events

    These are required for a forthcoming custom-built tooltip solution.
    committed Sep 20, 2016
Commits on Sep 19, 2016
  1. Fix theme accent color caching

    Accent color is now remembered when switching between light and dark
    themes
    committed Sep 19, 2016
  2. Layer box UI: heavily optimize thumbnail caching

    Multi-layer images should now be much more responsive when making
    changes to a single layer.
    committed Sep 19, 2016
  3. Layer box UI: restore mousewheel support

    Also, some high-DPI fixes.
    
    Next up: optimizing layer thumbnail caching, so we don't have to update
    *all* layer thumbnails if only *one* layer changes.
    committed Sep 19, 2016
Commits on Sep 18, 2016
  1. Layer UI: reinstate scroll bar when many layers are present

    Additional note: this layer UI overhaul reduced cold-start GDI object
    count by another~20 objects.
    
    Still to-do is mousewheel support, but that's trivial now that a scroll
    bar is correctly integrated.
    committed Sep 18, 2016
  2. Language files: update against layer changes

    The recent layer UI improvements reduced a number of redundant
    translations, so that's always nice.
    
    Thank you as well to Roy K for supplying additional Google Translate
    language files for new languages!
    committed Sep 18, 2016
  3. Layer UI: overhaul completely

    Building off the last commit, there are now no hover-only elements in
    the layer list box.  This makes that area much more touch-friendly,
    while also reducing visual clutter.  (Note that the plan is to move the
    removed UI items to a right-click menu; that is still TODO.)
    
    The new layer box layout is much closer to the competition, with the
    visibility toggle moved next to the edit area, thumbnails slightly
    shrunk, and much more room for the layer name.  Clickable regions have
    been enlarged, and the visibility toggle in particular now received a
    hover border, to let users know that it's clickable (in keeping with all
    other clickable UI elements in the project).
    
    The last thing left to solve here is reinstating the scroll bar for
    images with many layers.
    committed Sep 18, 2016
Commits on Sep 17, 2016
  1. Start total overhaul of primary layer list UI

    This old hunk of junk has not yet been integrated into the new theming
    engine.  It is also not really high-DPI aware, it's drawn using a bunch
    of unsafe subclassing, and it uses things like hover elements which are
    not really ideal for our modern touch-centric world.
    
    So it's time for an overhaul.  Among other things, the goal is to make
    the layer list box:
    
    1) Themable
    2) High-DPI aware
    3) Touch-friendly
    4) Make better use of space
    5) Less crash-prone (there's a lot of unsafe subclassing going on now)
    6) Less resource-intensive (it uses a ton of custom graphics in dumb
    ways)
    7) More responsive (*very* important for paint tools)
    
    A number of these items have already been accomplished in this initial
    commit.  The bulk of the control has been migrated to a new user
    control, rendering has been rewritten against PD's master user control
    support class, and theming has been enabled.
    
    Next up is restoring scroll behavior (there is no embedded scroll bar at
    present), and redesigning the individual layer blocks to not rely on
    hover behavior.
    committed Sep 17, 2016
Commits on Sep 10, 2016
  1. Overhaul Adjustments > Color > Temperature tool

    - A new "basic" method is available, which provides a generic
    temperature transform using an identical algorithm to the tint
    adjustment
    - The "exact"  method remains available, but it has been rewritten to
    use a new temperature transform, c/o
    http://www.zombieprototypes.com/?p=210
    committed Sep 10, 2016
  2. Fix the way metadata export preferences work

    Metadata export preferences now work the same way as all other export
    settings.  They are stored on a per-format basis, with last-used
    settings automatically saved/loaded on each invocation.
    
    This means there is now just one metadata export preference in the Tools
    > Options dialog: marking PD as the last-used software.  (Note that even
    if this setting is enabled, it will be ignored if the "anonymize
    metadata" setting is clicked at export time.)
    committed Sep 10, 2016
  3. Optimize translation engine startup

    Now that we support so many language files, translation engine startup
    had begun to occupy a large portion of the program initialization time.
    Some minor tweaks dropped average time on my development PC from ~1.2
    seconds to ~0.3 seconds, so a solid improvement.
    committed Sep 10, 2016
  4. Update all translation files against the latest nightly builds

    Many thanks to Roy K for handling this.  It's a time-consuming effort to
    keep these up-to-date, so I only do it sporadically.  It's a huge help
    when someone else tackles it.  Thanks, Roy!
    committed Sep 10, 2016
  5. New Macedonian language file

    Many thanks to Boban G (@bgerasimoski) for contributing this latest
    hand-edited language file to PD.  I never dreamed we'd be able to
    support so many languages, so this is a real treat!
    committed Sep 10, 2016
Commits on Sep 9, 2016
  1. New language file support

    Czech, Hungarian, Croatian, and Russian language files, courtesy of Roy
    K (and Google Translate).  Many thanks to Roy for providing these, as
    they're very helpful for testing PD's Unicode handling under a wide
    variety of locales.
    committed Sep 9, 2016
  2. Fix most remaining batch processor issues

    For 99% of batch tasks, the nightly build batch processor is back up and
    running.  Saving files once again works (yay!) and the new export engine
    appears to be operating nicely.
    
    A number of metadata fixes were required here, thanks to our
    asynchronous use of ExifTool.  If the batch processor gets ahead of
    ExifTool (e.g. ExifTool is still processing metadata when it's time for
    us to export a finished image) the engine is now smart enough to pause
    while ExifTool catches up.  This appears to solve all remaining issues
    with metadata handling during batch processing.
    
    There are a number of batch processor features and behaviors I'd still
    like to improve, but it's at least working well enough for me to remove
    the initial warning messages.  (I hope... I've got a massive batch
    process operation cranking in the background right now, as a final test
    of all the updated features.  Smaller tests have all gone well.)
    committed Sep 9, 2016
  3. Increase filename cache on post-XP systems

    See
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms646927(v=vs.85).aspx
    
    This isn't particularly relevant on the main screen, but in the batch
    processor, users may be adding tons of files at once
    committed Sep 9, 2016
Commits on Sep 8, 2016
  1. Workaround for FreeImage handling of some 32-bpp PNGs

    FreeImage will sometimes report 32-bpp PNGs with opaque alpha channels
    as *not* transparent.  This is confusing as colloquially, that may be
    true, but the images are still in RGBA format, so you need to use 32-bpp
    per-pixel offsets.  PD wasn't doing this, and it was leading to
    problematic handling of 32-bpp images with embedded ICC profiles (as the
    ICC engine was processing the images as RGB, not RGBA, on the assumption
    that there was no transparency data in the image; this led to mismatched
    byte ordering and all kinds of weird display issues).
    
    Anyway, it's simple enough to catch this rare case and work around it,
    but I'm concerned by the way FreeImage is reporting this.  I'll do some
    extra homework to make sure nothing else relies on their IsTransparent()
    function for correct behavior.
    committed Sep 8, 2016
  2. Batch wizard: check for deleted files before previewing

    Fixes #203.  Thank you to @vhreal1302 for originally reporting this bug.
    committed Sep 8, 2016
  3. Fix instant previews of HDR images

    Fixes #202.
    
    Thank you again to @vhreal1302 for first catching and reporting this
    problem.
    committed Sep 8, 2016
  4. Updated Chinese translation

    Many thanks to ChenLin for providing this update!
    committed Sep 8, 2016
  5. Updated German, new Polish translation

    Thank you once again to Roy K for this excellent addition to PD's
    translation library
    committed Sep 8, 2016