Re: word-select surprise

2022-09-18 Thread Andrew Parsloe


On 19/09/2022 10:19 am, Jean-Marc Lasgouttes wrote:

Le 17/09/2022 à 01:09, Andrew Parsloe a écrit :
I have a command-sequence that uses word-select prior to using cut. 
Recently I was surprised to find the content of the *previous* item 
saved to the clipboard being pasted rather than the expected one. 
After experimenting, I think an unintuitive cursor positioning is the 
cause.


Hi Andrew,

Indeed, selectWord does not really consider pre-existing selection.

Easy solution : reset selection before selecting word
More difficult one: extend current selection up to word boundaries.

I do not know which one is the most useful. What would you expect if 
the original selection spans more that one word?


JMarc


For my particular command sequence, I changed it to repeat word-select, 
which I suppose is your easy solution: the first word-select resets the 
selection, the second then selects the word.


For a pre-existing selection spanning a blank between words I think your 
more difficult solution is the intuitive behaviour: expand back to the 
beginning of the first word and forward to the end of the second word. 
Currently, it does just the second part. (Repeating word-select doesn't 
work in this case.)


Andrew

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Font size representation on macOS is off

2022-09-18 Thread Jean-Marc Lasgouttes


Le 01/09/2022 à 21:29, Daniel a écrit :
I think we should calculate the right size ourselves for macOS as 
Writer does. Otherwise, it is all really confusing. See also


https://apple.stackexchange.com/a/445862/377509


Either we do that, or we do as other real macOS apps do and add this 
"actual size" thing.


I tend towards calculating the right size at 100% if possible. I think 
that is more fitting to a cross-platform application. Besides Writer, 
Firefox also sets 100% at the correct size.


I do not think that the cross-platform part is relevant: LyX should feel 
like a macOS application on macOS. It is more important to feel right 
for macOS users than for users who use LyX on multiple platforms IMO.


I do not think we should introduce a change that make all user have to 
change their setting when upgrading LyX. We could change the default 
default zoom to be computed, though.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Increase max range of zoom slider?

2022-09-18 Thread Jean-Marc Lasgouttes

Le 16/09/2022 à 19:54, Scott Kostyshak a écrit :

I have an xps 13 9300, and I see the same. The issue is that the X11 (and
Wayland?) think that the screen is 50cm wide (ask xpdyinfo about it), so
that the dpi is supposed to be 96 instead of the actual 168.

This does not happen with all monitors though. This is what makes zoom
issues difficult to handle.


Ah that is good to know. In that case, seems to make sense to leave
things as is until the root (non-LyX) issues get addressed.


What happens here is that the screen DPI that we use is the logical DPI, 
which is in X11, macOS and maybe Windows 96 dpi. The physical DPI can 
also be obtained, and it is correct even on the XPS 13.


More details on why our definition of DPI fluctuated recently are there:
https://www.lyx.org/trac/ticket/12132
https://www.lyx.org/trac/ticket/1

See in particular this explanation of various DPIs:
https://stackoverflow.com/questions/16561879/what-is-the-difference-between-logicaldpix-and-physicaldpix-in-qt

I am not sure where to go from there. The macOS solution is to set the 
default zoom level to physical/logical*100 =~ 150% (see different thread 
from racoon). We could do that.


Other ideas?

JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: word-select surprise

2022-09-18 Thread Jean-Marc Lasgouttes

Le 17/09/2022 à 01:09, Andrew Parsloe a écrit :
I have a command-sequence that uses word-select prior to using cut. 
Recently I was surprised to find the content of the *previous* item 
saved to the clipboard being pasted rather than the expected one. After 
experimenting, I think an unintuitive cursor positioning is the cause.


Hi Andrew,

Indeed, selectWord does not really consider pre-existing selection.

Easy solution : reset selection before selecting word
More difficult one: extend current selection up to word boundaries.

I do not know which one is the most useful. What would you expect if the 
original selection spans more that one word?


JMarc

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: word-select surprise

2022-09-18 Thread Scott Kostyshak
On Sun, Sep 18, 2022 at 08:09:32PM +0200, Daniel wrote:
> On 2022-09-18 16:26, Scott Kostyshak wrote:
> > On Sat, Sep 17, 2022 at 11:09:52AM +1200, Andrew Parsloe wrote:
> > > I have a command-sequence that uses word-select prior to using cut. 
> > > Recently
> > > I was surprised to find the content of the *previous* item saved to the
> > > clipboard being pasted rather than the expected one. After experimenting, 
> > > I
> > > think an unintuitive cursor positioning is the cause.
> > > Suppose your word is abcdefghijk. If the cursor is positioned after the k
> > > and you invoke word-select the whole word abcdefghijk is selected. Howeve 
> > > if
> > > you start selecting character by character from the right (Shift + left
> > > arrow) and then after a few characters invoke word-select the selection is
> > > cancelled, leaving the cursor where it started after the k (meaning the 
> > > cut
> > > operation of my command sequence had nothing to save to the clipboard).
> > > In the other direction, with cursor positioned before the a and then
> > > (Shift+right arrow) a few characters selected, invoking word-select 
> > > expands
> > > the selection to the whole word. To my mind this is the behaviour I would
> > > expect also in the backward direction (as is the case in LibfreOffice).
> > > This is in 2.4.0 alpha3 on windows 10.
> > > Andrew
> > 
> > Testing the latest master commit, I confirm the behavior you describe
> > and I agree it should be improved.
> > 
> > Scott
> > 
> > 
> 
> I am not fully sure whether I understood the recipe. But it's the same in
> stable (no regression), right?

Yes I believe so.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: word-select surprise

2022-09-18 Thread Daniel

On 2022-09-18 16:26, Scott Kostyshak wrote:

On Sat, Sep 17, 2022 at 11:09:52AM +1200, Andrew Parsloe wrote:

I have a command-sequence that uses word-select prior to using cut. Recently
I was surprised to find the content of the *previous* item saved to the
clipboard being pasted rather than the expected one. After experimenting, I
think an unintuitive cursor positioning is the cause.
Suppose your word is abcdefghijk. If the cursor is positioned after the k
and you invoke word-select the whole word abcdefghijk is selected. Howeve if
you start selecting character by character from the right (Shift + left
arrow) and then after a few characters invoke word-select the selection is
cancelled, leaving the cursor where it started after the k (meaning the cut
operation of my command sequence had nothing to save to the clipboard).
In the other direction, with cursor positioned before the a and then
(Shift+right arrow) a few characters selected, invoking word-select expands
the selection to the whole word. To my mind this is the behaviour I would
expect also in the backward direction (as is the case in LibfreOffice).
This is in 2.4.0 alpha3 on windows 10.
Andrew


Testing the latest master commit, I confirm the behavior you describe
and I agree it should be improved.

Scott




I am not fully sure whether I understood the recipe. But it's the same 
in stable (no regression), right?


Daniel


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: word-select surprise

2022-09-18 Thread Scott Kostyshak
On Sat, Sep 17, 2022 at 11:09:52AM +1200, Andrew Parsloe wrote:
> I have a command-sequence that uses word-select prior to using cut. Recently
> I was surprised to find the content of the *previous* item saved to the
> clipboard being pasted rather than the expected one. After experimenting, I
> think an unintuitive cursor positioning is the cause.
> Suppose your word is abcdefghijk. If the cursor is positioned after the k
> and you invoke word-select the whole word abcdefghijk is selected. Howeve if
> you start selecting character by character from the right (Shift + left
> arrow) and then after a few characters invoke word-select the selection is
> cancelled, leaving the cursor where it started after the k (meaning the cut
> operation of my command sequence had nothing to save to the clipboard).
> In the other direction, with cursor positioned before the a and then
> (Shift+right arrow) a few characters selected, invoking word-select expands
> the selection to the whole word. To my mind this is the behaviour I would
> expect also in the backward direction (as is the case in LibfreOffice).
> This is in 2.4.0 alpha3 on windows 10.
> Andrew

Testing the latest master commit, I confirm the behavior you describe
and I agree it should be improved.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel