1. 24 Jan, 2023 2 commits
  2. 23 Jan, 2023 1 commit
  3. 22 Jan, 2023 1 commit
  4. 21 Jan, 2023 1 commit
  5. 20 Jan, 2023 2 commits
  6. 19 Jan, 2023 1 commit
  7. 18 Jan, 2023 2 commits
  8. 09 Jan, 2023 10 commits
    • ivan tkachenko's avatar
      Replace `icon.color.a > 0` check with proper Qt.colorEqual · 122cd908
      ivan tkachenko authored
      Theoretically, this allows using tinted transparent colors for better
      transitions: even if alpha is set to zero QtQuick would still animate
      r, g and b components instead of defaulting to textColor of a theme.
      
      On practice, however, qqc2-desktop-style/breeze does not seem to take
      alpha channel into account, so icons always look like if the alpha was 1.
      122cd908
    • ivan tkachenko's avatar
    • ivan tkachenko's avatar
      DelayButton: Fix hasFocus binding · 69531ee2
      ivan tkachenko authored
      This was clearly a copy-paste mistake from ToolButton. There is no
      `flat` property on DelayButton, and it was missing that last
      `|| controlRoot.highlighted` part. Likewise, `highlighted` property is
      exclusive to Buttons, which DelayButton does not inherit from, thus no
      need to port it here either.
      69531ee2
    • ivan tkachenko's avatar
      Menu: Factor out property assignment · 8a07dc70
      ivan tkachenko authored
      Assigning to a property in a tight loop is inefficient. Better create
      some local variables for such purpose.
      
      Note that once set to true, neither of those two properties can reset
      back to false. This is probably due to the fact that the code deals with
      only visible subset of a ListView's delegates.
      8a07dc70
    • ivan tkachenko's avatar
      RadioButton: Add support for icons, just like in CheckBox · c0164de6
      ivan tkachenko authored
      In fact, they already shared all the required code except this switch.
      
      BUG: 442986
      c0164de6
    • ivan tkachenko's avatar
      TabBar: Fix glitchy overlap · 782c2225
      ivan tkachenko authored
      Just remove magic `- 1` adjustment. Seems to be perfectly fine without it.
      782c2225
    • ivan tkachenko's avatar
    • ivan tkachenko's avatar
      TabButton: Fix/add icons rendering · 252f213e
      ivan tkachenko authored
      Basically, a copy-paste code from CheckBox/Button/etc. The only
      difference is the choice of pixel metrics: QStyle::PM_TabBarIconSize.
      252f213e
    • ivan tkachenko's avatar
      Revisit usages of QtQuick.Controls/AbstractButton::icon grouped property · e74b8530
      ivan tkachenko authored
      Here are the rules:
      
      1. AbstractButton::icon is a grouped property. It can not be used as a
      conditional expression by itself as it would be quite pointless,
      because it's always considered truthy like any normal object in js.
      
      2.a. icon.name is a string, which itself can be compared to an empty
      string "", or its .length property compared to zero.
      
      2.b. icon.source is a QUrl, or a `url` as QmlEngine likes to call it. It
      is an opaque object for JavaScript environment, which provides magical
      toString() method that makes it look like a string in some contexts.
      Strict equality with real strings will fail, as well as attempts to
      access its .length directly. Empty url converts to an empty string.
      
      2.c. KQuickStyleItem accepts both strings and urls as `properties["icon"]` value.
      
      4. Other sub-properties of icon are always present and default to some
      values such as 0 size and transparent color.
      e74b8530
    • ivan tkachenko's avatar
      Optimize loading icons from properties · d82036e8
      ivan tkachenko authored
      A little copy-pasta from a generic Button code above.
      d82036e8
  9. 07 Jan, 2023 1 commit
  10. 13 Dec, 2022 2 commits
  11. 12 Dec, 2022 3 commits
  12. 11 Dec, 2022 1 commit
  13. 03 Dec, 2022 1 commit
  14. 02 Dec, 2022 1 commit
  15. 01 Dec, 2022 1 commit
  16. 28 Nov, 2022 2 commits
    • Tanbir Jishan's avatar
      Switch: Improve background contrast when in unchecked state · f47aea56
      Tanbir Jishan authored and Nate Graham's avatar Nate Graham committed
      This MR improves the background color for better contrast for unchecked state.
      Basically it darkens the color in light mode and lighten the color in dark mode.
      In brief the changes are:
      
      1. The background is made better
      2. The layer is enabled only when needed
      f47aea56
    • Arjen Hiemstra's avatar
      styleitem: Don't destroy and recreate the style on every instance creation · 79807e9d
      Arjen Hiemstra authored
      Parsing config and creating a new style for every instance is an
      incredibly expensive operation that shouldn't be done every time an
      instance is created. Moreover, the current code makes little sense to me
      as it completely removes the reason for storing things in a static in
      the first place.
      
      Instead, just initialise the static style once and use that static for
      consecutive instances. This reduces the time needed to create an
      instance of Button from over 7ms(!) to around 0.4ms. As an additional
      bonus, store the style instance in a shared_ptr so we don't need to
      memory manage it.
      79807e9d
  17. 25 Nov, 2022 1 commit
    • David Edmundson's avatar
      Fix blurry controls in QQuickWidget · 2578c4db
      David Edmundson authored
      QQuickWindow::devicePixelRatio doesn't take into account being inside a
      QQuickWidget or other render target. This matters if the window dpr differs
      from the screen dpr, something we see on wayland.
      
      QQuickWindow has another similarly named method which does, with docs
      stating this is the one that should always be used.
      2578c4db
  18. 18 Nov, 2022 1 commit
    • ivan tkachenko's avatar
      DislogButtonBox: Fix url value comparison with non-strict == · e4df7e74
      ivan tkachenko authored
      Another case solved, Dr. Watson. The reason was that QUrl is an "object"
      for QML engine, and non-strict equality operator simply converts it
      toString() beforehand. Icon source is a url, icon name is already a
      string. Let's convert and compare explicitly and without dark magic.
      e4df7e74
  19. 17 Nov, 2022 1 commit
    • Tanbir Jishan's avatar
      switch: Improve it · efa03a3a
      Tanbir Jishan authored and Nate Graham's avatar Nate Graham committed
      Switch control currently does not look good. This commit improves it to be based on a combination
      of the Breeze Blue Ocean mockup and the existing implementation in in qqc2-breeze-style.
      efa03a3a
  20. 14 Nov, 2022 1 commit
  21. 11 Nov, 2022 1 commit
  22. 06 Nov, 2022 1 commit
    • ivan tkachenko's avatar
      BusyIndicator: Synchronize to implementation in PlasmaComponents3 · fbbfb843
      ivan tkachenko authored
      Apart from ruthlessly copying code from there, also drop unused spacing
      and set inheritable property hoverEnabled to false to preserve some
      resources. Content Items's id was unused, to it was removed as well,
      and a new MR is pending for PC3 repo.
      
      See plasma-frameworks for atomic commits and detailed commit messages.
      fbbfb843
  23. 05 Nov, 2022 1 commit
  24. 04 Nov, 2022 1 commit
    • Nate Graham's avatar
      Never time out tooltip while its control is still hovered · 4c5840d6
      Nate Graham authored
      Right now there's logic to try to predict how long a user will need to
      read the tooltip, and time it out after that. This is unreliable and
      requires making an assumption about the user's reading speed, which is
      unknowable. As a result, the tooltip can still time out while you're in
      the middle of reading it, which is annoying.
      
      There's no real reason why we need to time it out automatically at all,
      so let's just keep it open while the user is still hovering the control.
      They're probably doing so for a good reason.
      4c5840d6