Re: [Lazarus] Mac Hi-DPI 2

2017-03-09 Thread Alexey via Lazarus

This picture is OS opts:

here you see, max NNxNN dont change, but only hi-dpi "added to video mode".
Alex
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Ondrej Pokorny via Lazarus

On 09.03.2017 20:41, Michael Ring via Lazarus wrote:
Cocoa Build crashes on startup (It was never stable for me, so no 
worries here.)


Yes, Cocoa is unfortunately in alpha-state :(

Thank you for your screenshots - everything looks fine. I assume Carbon 
is using some kind of virtual DPI so actually no LCL-scaling is done on 
Retina Mac. I also see there are no font problems.


Did you have to adjust Lazarus editor font height recently? (Due to 
r53712 - http://mantis.freepascal.org/view.php?id=31037 .)


Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Ondrej Pokorny via Lazarus

On 09.03.2017 21:37, Alexey via Lazarus wrote:

On 09.03.2017 21:58, Ondrej Pokorny via Lazarus wrote:

can you tell why the Mac font becomes bigger?


Because Font: Height := -MulDiv(Size, *PixelsPerInch*, 72);


If you change 72 here too to 96, it will be okay?



Yes, it would behave like before r53712.

--
But actually I now tested the font problem on Mac:

Lazarus 1.6: Font.Size=8 (or any other value) results in different 
visual font height on Windows and Mac.
Lazarus trunk: Font.Size=8 (or any other value) is the same height on 
Windows and Mac.


To me it looks like the change of DPI from 72 to 96 fixed the font size 
problems and made texts look the same. Obviously, when updating from 1.6 
to 1.7 (1.8) people on Mac will have to adjust custom (nonzero) font sizes.


I.e. it looks like no change is required. I will only leave a note about 
it in release information.


If you experience something else and you think I am wrong, please write 
about it. My testing chances on Mac are limited. I'd like to have the 
DPI-Scaling as good as possible for 1.8 RC1.


Ondrej
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Alexey via Lazarus

On 09.03.2017 21:58, Ondrej Pokorny via Lazarus wrote:

can you tell why the Mac font becomes bigger?


Because Font: Height := -MulDiv(Size, *PixelsPerInch*, 72);


If you change 72 here too to 96, it will be okay?

--
Regards,
Alexey

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Michael Ring via Lazarus
I have a Retina Display, for me the Lazarus IDE looks just fine. There 
are some very minor issues with Buttons not beeing big enough similar, 
but there are only very view.


I cannot judge how Apps built with the option look like, I use Lazarus 
for development on Embedded Controllers only.


I will send you three screenshots I've made via PM, my Lazarus was built 
with Carbon, running a Cocoa Build now...


Thank you very much for your great work,

Michael


Am 09.03.17 um 16:18 schrieb Ondrej Pokorny via Lazarus:

On 09.03.2017 16:10, Michael Ring via Lazarus wrote:
I build Lazarus about every other week from trunk and use it on my 
Mac. I have no idea on how to solve the issue but when you want me to 
test something on trunk let me know...


Yes :) If you use Carbon or Cocoa: how does the latest Lazarus IDE 
look like (check that it is built with Application.Scaled (Project 
Options -> Application -> "Use LCL scaling (Hi-DPI)). Is everything 
fine - text size, button size etc? Did anything change from 1.6?


Do you have a retina display? If yes, could you upload a screenshot 
somewhere?


Thanks!
Ondrej


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Alexey via Lazarus

On 09.03.2017 16:01, Ondrej Pokorny via Lazarus wrote:
will have the ScaleFactor equivalent (I'll keep PixelsPerInch). 
Probably more changes will be needed.
On Windows: DesignTimePPI=96 -> DesignTimeScaleFactor=100 <- On Mac: 
DesignTimePPI=72. The same goes for PixelsPerInch/ScaleFactor.


IMO it's not needed yet. can you tell why the Mac font becomes bigger? 
If we can find why font becomes bigger, we can try to fix font size. 
maybe default font size is eg 12. then we can change default to eg 10/ or 9


--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TPicture width questions (duplicate ways)

2017-03-09 Thread Lars via Lazarus

On 2017-03-09 10:48, José Mejuto via Lazarus wrote:


AFAIK:

TPicture.Width is the TGraphic container size.
TPicture.jpeg.Width is the width declared in the jpeg image.
TPicture.Bitmap.Width is the width of the bitmap in pixels.

Mostly the 3 will have the same value but extracted from different 
sources.




If I start off using a bitmap, and all of a sudden start using jpeg, 
will it automagically work or does one have to initiate the jpeg in some 
way?


Example: you start off working with a classic BMP, but then 60 lines of 
code later you want to work with it as a jpeg. Do you just magically 
start working with a jpeg without any worry, or you have to take some 
precautions?


Likely, this is explained in a article on the wiki somewhere, I don't 
know :-)

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Animation library

2017-03-09 Thread José Mejuto via Lazarus

El 09/03/2017 a las 17:11, Lars via Lazarus escribió:


Except for the fact that VM's suffer from corrupt hard drive file
problem. All your files are stored in a file, which is extremely
dangerous compared to having files stored as separate files. If one
little bit is f**ked in that hard  drive disk image file, all your work
is lost, unless you can magically hack the file yourself into good shape
which is equivalent of trying to make a square become a circle :-)


Hello,

It is as dangerous as all your files are in a harddisk, if the harddisk 
crashes ( physically ) you lost all your files.


It's almost impossible to corrupt a virtualbox disk image as its inner 
working is too much simple. Even if a corruption happens its very easy 
to convert to a dd raw image and mount it in your favorite OS. The only 
corruption that will certainly ruin your VM disk is a page allocation 
corruption, which is mostly as you overwrite the NTFs MFT and partition 
table and/or  your ext3/4 iNode table.


I'm using my VM's as real computers, so backups are usual but from 
inside the VM (SVN for sources and backups for other files) not a 
virtual disk image copy (VM must be stopped).



--

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Error: No Memory left at linking Lazarus with fpc trunk

2017-03-09 Thread Andreas Frieß via Lazarus

Luiz Americo Pereira Camara via Lazarus wrote:

> Seems that code typhon fixed it. See entry 16-Nov-2016 ver 5.90 at

I looked for it and made a compare.

One change is in the pp.pas aroud line 150. Now i patched the actual 
trunk 35551. Now fpc compiles the 'Big' Lazarus for me.


Andreas

===

{$ifdef win32}
  { 256 MB stack }
  { under windows the stack can't grow }
  {$MAXSTACKSIZE 25600}
  {$setpeflags $20} //=== ct =
{$else win32}
  {$ifdef win64}
{ 512 MB stack }
{ under windows the stack can't grow }
{$MAXSTACKSIZE 51200}
  {$else win64}
{ 1 MB stack }
{$MINSTACKSIZE 100}
  {$endif win64}
{$endif win32}


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TPicture width questions (duplicate ways)

2017-03-09 Thread José Mejuto via Lazarus

El 09/03/2017 a las 17:05, Lars via Lazarus escribió:

TPicture has several width properties in all sorts of places, for example:

var p: TPicture;
begin
  ...
  p.width
  p.jpeg.width
  p.bitmap.width
end;

Are any of these pure duplicates that are exactly the same thing, or do
some of them have different behaviours and should most definitely not be
used interchangeably?



Hello,

AFAIK:

TPicture.Width is the TGraphic container size.
TPicture.jpeg.Width is the width declared in the jpeg image.
TPicture.Bitmap.Width is the width of the bitmap in pixels.

Mostly the 3 will have the same value but extracted from different sources.

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Animation library

2017-03-09 Thread Lars via Lazarus

On 2017-03-08 13:08, Graeme Geldenhuys via Lazarus wrote:

VM's also give you a lot of piece-of-mind. If your real hardware fails,
move the VM to any other system and continue where you left off - 
hardly

any down time. I regularly make backup copies or take snapshots of my
VM's too. Snapshots are very handy for experimentation.


Except for the fact that VM's suffer from corrupt hard drive file 
problem. All your files are stored in a file, which is extremely 
dangerous compared to having files stored as separate files. If one 
little bit is f**ked in that hard  drive disk image file, all your work 
is lost, unless you can magically hack the file yourself into good shape 
which is equivalent of trying to make a square become a circle :-)


This is the only real thing stopping me from using vm's more often is if 
I save any work to the VM disk image, it scares me that the disk image 
could become corrupt. You could back it up daily to GIT I suppose, but 
that would be a massive file to upload to git... way too big... Maybe on 
a local git server in your home with a 1000 speed network card instead 
of 10/100


Speaking of emulators, FreeBSD also includes a Linux Emulator (an 
actual
CentOS 6.6 install I believe), so you can run FreeBSD, Windows and 
Linux

applications without firing up a VM. Pretty neat!


OpenBSD also allowed you to run Linux exe's (elfs) AFAIR in some kind of 
linux jail on the system.


Too bad OpenBSD developers are a bunch of criminal twats who stalk and 
taunt people, along with restricting speech on their mailing lists. To 
keep this post on topic, I did want Lazarus to run on OpenBSD , not sure 
if any progress has been made there. I know some efforts were made to 
get fpc working. But now I could care less.

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus