Feed Advanced Search

May 4 2018

abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Rebase
May 4 2018, 9:08 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Remove inline keywords
May 4 2018, 9:00 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Rebase
May 4 2018, 8:57 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Unfuzz borders and text
  • Restore old help box functionality
May 4 2018, 8:54 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Fix magnifier border
May 4 2018, 8:39 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.
  • Fix all border issues

Selection border looks much better now ;) More comments:

  • Is the bottom and right border of the magnifier working for you with 1x scaling? Just asking, because with QML it never worked for me, but for QPainter it should probably work?
  • The borders of the size label and the bottom help text are still fuzzy.
  • Make sure to add your fixes to the correct Diff (this one is only about the magnifier, IIRC ;)
May 4 2018, 8:36 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Rebase
May 4 2018, 8:18 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Fix rectangle border painting
May 4 2018, 8:11 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Fix all border issues
May 4 2018, 8:00 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

Oh I noticed that too, just figured it out, it is aligned, but the dark mask is one pixel off haha

May 4 2018, 7:23 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

Yeah, you're right, anti-aliasing wasn't the culprit, here's a screenshot with anti-aliasing back on for confirmation

May 4 2018, 7:06 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

Ahh, gotcha, and I know why: anti-aliasing, I'll disable it and take a screenshot again

May 4 2018, 6:53 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

Rectangle is now 1 "real" pixel wide even on HiDPI. Tested on 2x scaling on 3840x2160. Red line is 2 real pixels wide.


Edit: forgot to check "Include cursor" while taking the screenshot. The cursor is dragging the bottom-right corner

May 4 2018, 6:45 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

So, is it best to just ditch inline from everywhere and let the compiler decide?

May 4 2018, 6:38 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.

Make the rectangle border one real pixel thick, and align border to crosshair

May 4 2018, 6:34 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

One nip-tick: inline should be placed in function definition not in declaration, you can make other review to correct it.

May 4 2018, 6:07 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.

Rebase

May 4 2018, 5:31 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 4 2018, 5:29 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.

Rebase

May 4 2018, 5:22 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.

Fix diff

May 4 2018, 5:14 PM · Spectacle
abalaji updated the diff for D12692: Add back magnifier to QPainter port of rectangle selection.
  • Fix issues
May 4 2018, 5:06 PM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

Oh so sorry @rkflx, I keep forgetting that the "title" is the commit message, my bad! And the top of the crosshair was correct at one point, I pushed the wrong thing out whoops, I'll fix that right away. By logic, I guess I meant more about the behaviour, but a code review would be great too :D. I'll work on the border stuff next

May 4 2018, 4:58 PM · Spectacle
abalaji retitled D12692: Add back magnifier to QPainter port of rectangle selection from Implement magnifier for Rectangle mode port to Add back magnifier to QPainter port of rectangle selection.
May 4 2018, 4:49 PM · Spectacle
abalaji added a dependent revision for D12626: Port QML Rectangle cropper to QWidget + QPainter: D12692: Add back magnifier to QPainter port of rectangle selection.
May 4 2018, 4:48 PM · Spectacle
abalaji added a dependency for D12692: Add back magnifier to QPainter port of rectangle selection: D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 4 2018, 4:48 PM · Spectacle
abalaji added a comment to D12671: Fix memory leaks.

Hooray, bless! You say the next ones won't be this easy, I believe you haha

May 4 2018, 3:57 PM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Got the magnifier out here: D12692

May 4 2018, 7:36 AM · Spectacle
abalaji updated the summary of D12692: Add back magnifier to QPainter port of rectangle selection.
May 4 2018, 7:35 AM · Spectacle
abalaji added a comment to D12671: Fix memory leaks.

@rkflx check out D12693

May 4 2018, 7:33 AM · Spectacle
abalaji requested review of D12693: Remove unused header file.
May 4 2018, 7:33 AM · Spectacle
abalaji added a comment to D12671: Fix memory leaks.

Done

May 4 2018, 7:30 AM · Spectacle
abalaji updated the diff for D12671: Fix memory leaks.
  • Undo change
May 4 2018, 7:29 AM · Spectacle
abalaji added a comment to D12692: Add back magnifier to QPainter port of rectangle selection.

The code still needs a little cleanup, but before that, please make sure I got the logic down

May 4 2018, 7:25 AM · Spectacle
abalaji requested review of D12692: Add back magnifier to QPainter port of rectangle selection.
May 4 2018, 7:24 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Fix out of bounds by one pixel
May 4 2018, 7:19 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Optimize mouse tracking
  • HiDPI and other fixes
May 4 2018, 12:44 AM · Spectacle

May 3 2018

abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Rebase master
May 3 2018, 2:59 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Oops forgot light background mode
May 3 2018, 1:58 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Respect theme colors
May 3 2018, 1:37 AM · Spectacle

May 2 2018

abalaji retitled D12626: Port QML Rectangle cropper to QWidget + QPainter from Performance enhancements and bug fixes to Port QML Rectangle cropper to QWidget + QPainter.
May 2 2018, 8:55 PM · Spectacle
abalaji updated the summary of D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 2 2018, 8:51 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • One more
May 2 2018, 8:19 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Undo split off changes
May 2 2018, 8:16 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Back to C++11
May 2 2018, 8:03 PM · Spectacle
abalaji added a comment to D12671: Fix memory leaks.

Split off from D12626

May 2 2018, 8:00 PM · Spectacle
abalaji added a project to D12671: Fix memory leaks: Spectacle.
May 2 2018, 7:59 PM · Spectacle
abalaji requested review of D12671: Fix memory leaks.
May 2 2018, 7:56 PM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Cool, thanks for your continued work. Take your time, no need to rush. I'll still fix the colour scheme issues with the QML UI (see D12657), but it should be quick to also take those over into your port.

Note that my first comment was merely some quick feedback, obviously more in-depth testing and code review will follow when I have more time. As mentioned before, please adapt your title to the imperative mood, and split the patch up into multiple Diffs (e.g. porting, fixing leaks, adding the magnifier back etc.).

As for the VM: It does seem to have some kind of accelerated code path regarding video acceleration (e.g. for KWin there is OpenGL through the guest addition drivers instead of XRender), but my machine is pretty slow anyway.

(One more thing that came to mind: It's probably the approach of using getContext("2d") that made it so slow before your patch, because normally QML should be hardware accelerated, after all. It really depends on what your project is about: Pixel pushing vs. a fluid IVI UI. No QtQuick hate, please ;)

Regardless, as your patch makes it faster on your enormous screen, I'm all for it.

May 2 2018, 4:08 PM · Spectacle
abalaji updated the summary of D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 2 2018, 5:27 AM · Spectacle
abalaji added inline comments to D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 2 2018, 4:46 AM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

@anthonyfieroni

May 2 2018, 4:21 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Clean up header files
May 2 2018, 3:55 AM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Thanks @ngraham, ikr so much faster. I think I'm going to think twice before using QtQuick for my next project

May 2 2018, 3:50 AM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Before:
(pointing out a nitpicky bug of not changing the cursor before you move your mouse)


After:
(new feature: keeping the cursor while cropping)

May 2 2018, 3:46 AM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Before:

After:

PS: Sorry, just couldn't get my phone camera to focus (I think I might have broken it)

May 2 2018, 3:37 AM · Spectacle
abalaji updated the summary of D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 2 2018, 3:34 AM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

Alright, so I've now ported over the new help menu from D12617. Got to port over the magnifier from D11599. Videos and screenshots coming over soon.

May 2 2018, 2:44 AM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Implement new help menu
May 2 2018, 2:41 AM · Spectacle

May 1 2018

abalaji added a comment to R166:4e2f90a30b66: Improve on-screen help text for rectangular selection.

We can use the same trick we use for the selection size tooltip, and have a dark rectangle with light text with a dark theme

May 1 2018, 10:49 PM
abalaji added a comment to R166:4e2f90a30b66: Improve on-screen help text for rectangular selection.

Hey, guess I'm too late. Was testing this with Breeze dark and looks like the text turns white, rip{F5829848}

May 1 2018, 10:31 PM
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

I've taken inspiration from gwenview's trick of hiding unnecessary controls when not needed. So now I only draw the bottom help text and the drag handles when the mouse is up and no drag is in progress. This might give a slight performance boost again, since the function does less heavy-lifting while dragging.

May 1 2018, 10:02 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Refactor
May 1 2018, 9:59 PM · Spectacle
abalaji updated the diff for D12626: Port QML Rectangle cropper to QWidget + QPainter.
  • Switch to QWidget
May 1 2018, 6:48 PM · Spectacle
abalaji added a comment to D12626: Port QML Rectangle cropper to QWidget + QPainter.

@rkflx thanks for the review!

  • That's right, I have a gwenview one that I'm kinda blocked on as I'm on the road and don't have enough means to test stuff, as for the dolphin one I'm seeing some weird issues with the Breeze widget style, trying to figure those out, I'll try my best to devote as much time as I can
  • I kinda forgot the summary is a commit message, my bad, it's fixed now
  • #3 and #4 can be made their own thing probably
  • These are related to memory leaks I found and patched, related to #3
  • Yeah, I saw those right after I pushed out this diff, D12617 should be quick, D11599 might take longer
May 1 2018, 6:41 PM · Spectacle
abalaji updated the summary of D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 1 2018, 6:24 PM · Spectacle
abalaji added a project to D12626: Port QML Rectangle cropper to QWidget + QPainter: Spectacle.
May 1 2018, 3:27 AM · Spectacle
abalaji requested review of D12626: Port QML Rectangle cropper to QWidget + QPainter.
May 1 2018, 3:17 AM · Spectacle

Apr 19 2018

abalaji added a comment to D7581: HiDPI Support for Gwenview.

@ngraham I've been out of town on an internship since early Jan, and haven't been able to test some of the HiDPI stuff across monitors with different scaling, so I've not made a lot of progress since. I'm coming back in a few weeks, and I can catch up after that

Apr 19 2018, 3:47 AM · Gwenview

Apr 17 2018

abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.
  • Minor fixes and cleanup
Apr 17 2018, 11:51 PM · Dolphin

Apr 16 2018

abalaji added a comment to D12202: Add support for touch scrolling.

And @markg I found this tool that lets you simulate a touchscreen: https://github.com/vi/virtual_touchscreen

Apr 16 2018, 6:46 PM
abalaji added a comment to D12202: Add support for touch scrolling.

I "abandonded" it, does that not do that?

Apr 16 2018, 6:45 PM
abalaji added a comment to D12202: Add support for touch scrolling.

Sorry @markg, I created this revision by accident while setting up arc, D12162 is the leading one

Apr 16 2018, 5:04 PM

Apr 14 2018

abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.
  • Touch double click
Apr 14 2018, 9:54 PM · Dolphin
abalaji added a comment to D12162: Add support for touch scrolling in Dolphin.

Hmm, I had to get rid of the touch-hold-drag thing because earlier I was just adapting the existing mouse event handlers with touch, but because multitouch caused issues with that, I've now had to setAcceptTouchEvents(true) on the KItemListView, which means Qt will no longer emit fake mouse events on touch, and that also means no drag and drop because it seems that only works with mouse events. I also disabled rubberbands on touch so I'm seeing any on my end. What kind of touchscreen do you have? Can you verify if touchBeginEvent, touchUpdateEvent, and touchEndEvent are all firing for you?

Apr 14 2018, 7:51 PM · Dolphin
abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.

Now using arc

Apr 14 2018, 6:23 PM · Dolphin
abalaji abandoned D12202: Add support for touch scrolling.
Apr 14 2018, 6:16 PM
abalaji requested review of D12202: Add support for touch scrolling.
Apr 14 2018, 6:14 PM
abalaji added a comment to D12162: Add support for touch scrolling in Dolphin.

Thanks! I'll use that from now on. I've just been using git format-patch so far.

Apr 14 2018, 6:03 PM · Dolphin
abalaji added a comment to D12162: Add support for touch scrolling in Dolphin.

Okay, so that seems to have fixed that. Is there a cleaner way to append a diff rather than squashing commits together? Can I just push to a branch or something?

Apr 14 2018, 5:59 PM · Dolphin
abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.

Squash diffs together

Apr 14 2018, 5:58 PM · Dolphin
abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.

Simplify some if-else statements

Apr 14 2018, 7:40 AM · Dolphin
abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.

Due to the limitations of detecting multiple touches with "fake" mouse events triggered by automatically by Qt on touch, I've had to implement real touch event handlers and which means goodbye drag and drop because after some digging it seems that touch events and native drag n drop don't work well with each other. I've also added the touch gesture to the information panel which is partly broken right because of the "Drag windows by empty space" feature discussed before

Apr 14 2018, 2:26 AM · Dolphin

Apr 13 2018

abalaji added a comment to D12162: Add support for touch scrolling in Dolphin.

So I'm facing issues with this thing which after a bit of digging turns out to be this feature where kwin lets you "Drag windows from all empty areas" (default System Settings -> Application style -> Widget Style -> Applications -> Configure... -> Windows' drag mode), which often gets triggered (incorrectly) by touching and dragging on an empty area like while touch scrolling on the information panel. If you click and drag with a mouse, the dragging works as expected, but when you touch and drag, the window gets put into dragging mode (turns translucent due to desktop effects), but stays where it is and freezes. I have to lift my finger and touch it back down at a spot to make the window move there. This probably has nothing to do with dolphin itself but it's really weird when this effect kicks in, but regardless of whether it happens correctly or not, I was wondering how kwin figures out which widget is an "empty area" and if there's a way for a widget to tell the window manager it wants to disallow that?

Apr 13 2018, 5:28 PM · Dolphin

Apr 12 2018

abalaji added a comment to D12162: Add support for touch scrolling in Dolphin.

Hi @ngraham thanks for reviewing this!

  • I'll implement touch in the information and settings panels next.
  • 1 second is probably too long, but regardless it might be failing because a mouseMove event is accidentally getting triggered while you're holding (probably finger fatigue during that one long second), which instantly cancels the QTimer that enables dragging. One way to fix that would be to store the coordinates of the mouse press event, and on a mouse move event, rather than cancelling the timer, have a threshold of distance your finger can wiggle around.
  • The last issue is probably because I'm currently assuming that the events fire like touch start -> (maybe) touch move -> touch release, which would obviously break with multiple fingers. I can just ignore every additional finger touch, easy fix.
Apr 12 2018, 11:01 PM · Dolphin
abalaji updated the diff for D12162: Add support for touch scrolling in Dolphin.

Remove unnecessary edits

Apr 12 2018, 8:34 PM · Dolphin
abalaji requested review of D12162: Add support for touch scrolling in Dolphin.
Apr 12 2018, 8:21 PM · Dolphin

Dec 28 2017

abalaji updated the diff for D9078: HiDPI fixes for thumbnails in gwenview.
Dec 28 2017, 6:29 PM
abalaji added a comment to D9078: HiDPI fixes for thumbnails in gwenview.

Can we just multiply with dpr here and elsewhere? I'm asking because before this could have two distinct values, but now depending on a fractional scaling factor this can vary wildly.

Maybe this is okay if this is just a threshold internal to Gwenview, but in case this is related to an external standard which specifies this sizes (thumbnail caching?) it would be a problem.

Could you research this a bit?

The thumbnail sizes are specified in thumbnailgroup.h. I think the thumbnails are stored in the thumbnail cache somewhere. I'm not too sure right now about where exactly the logic governing that is, but I think we should be storing high DPI thumbnails in the cache if the user has a hidpi display, and let QPaintDevice->devicePixelRatio() handle the scaling while painting. Either way, I think we should let thumbnailgroup.h specify the base "logical" thumbnail size, and scale that up accordingly, like I've done here. What's your opinion on this?

Dec 28 2017, 6:18 PM
abalaji added a comment to D9078: HiDPI fixes for thumbnails in gwenview.

Hi,
Hope everyone is enjoying the holidays!

Fixing rendering of frames and shadows.

I figured these out, so these are not pixelated anymore :). Going up to like 6x scaling helps a lot with identifying and fixing these issues, thanks @rkflx for the tip!

I should be using QPaintDevice while painting them it seems, so I'll need to get that sorted out

This was pointed out in D7581#141493, so qApp->devicePixelRatio() gives the largest value of all the DPR's of the connected monitors, and QPaintDevice->devicePixelRatio() gives the DPR of the current screen, so while painting, I need to use this value to ensure that the scaling is correct. This needs to be fixed in the main patch as well

Thumbnail Bar broken, regardless if I apply your patch standalone on master, on the tip of the gsoc branch or on the commit before the tip. Am I holding this wrong? I wonder, because you said 1. is fixed, but the Thumbnail Bar is listed there…
Video thumbnails still pixelated, even though you said 1. was fixed.

I guess I just fixed part 1 of the 1, sorry I missed all these cases. I'll try and get these fixed soon as well, sound be similar enough

Thumbnails should fit the space available, but when previewing a very low-res image the thumbnail is also very tiny. Should we upscale in this case?

Well, so if the image itself is tiny, then I don't think we should upscale, since that's the way it is currently, and we shouldn't change the existing behaviour

Dec 28 2017, 6:11 PM

Dec 20 2017

abalaji added a comment to D9078: HiDPI fixes for thumbnails in gwenview.

Do you know about the list of issues in D7581#163655 (1. specifically)? Is this all expected to work with your patch?

  1. is the only issue fixed in this patch. The frames around the thumbnail pixmaps seem to be already working correctly: I cannot make out any issues with it.
Dec 20 2017, 9:57 PM

Dec 19 2017

abalaji added a comment to D7581: HiDPI Support for Gwenview.

Hi, if you haven't already, please have a look at D9078, where I figured out HiDPI for thumbnails. I would love to have some feedback, As for the small thumbnail issue @hetzenecker was facing, I was facing that too, but I realized I needed to generate bigger thumbnails, so if I have 2x scaling, I generate 256px * 2 = 512px wide thumbnails, unlike D6083 which suggests upping the base thumbnail size itself. The HiDPI patch for Okular (thank you @hetzenecker!) landed and I'm glad I can finally switch back from evince, and it would be great to have gwenview fixed soon as well!

Dec 19 2017, 11:14 PM · Gwenview

Dec 10 2017

abalaji added a comment to D9078: HiDPI fixes for thumbnails in gwenview.

Hi, sorry for replying this late, I'm glad you're happy about my contribution. I'm currently using QApplication rather than QWindow, QScreen etc, just like it is in the rest of the work by Lukas (basically I just looked at what he did and tried to do the same). So it's probably not the best solution, but it does take care of the thumbnails, which look much better now.

Dec 10 2017, 9:49 PM

Nov 30 2017

abalaji created D9078: HiDPI fixes for thumbnails in gwenview.
Nov 30 2017, 10:34 PM