Re: [Lazarus] Mac Hi-DPI 2
On 11.03.2017 23:37, Ondrej Pokorny via Lazarus wrote: We have 2 possible solutions: The solition 3) don't scale the app down, from 96 LCL to 72, to any lower value than 96. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] HI-DPI Strangeness
Hi All! I have noticed strange behavior with Lazarus 1.7 in the HI-DPI mode. This took some trial and error to find since the connections are not at all obvious. I am using Linux Mint 18 and have the same problem with both MATE and XFCE desktop managers. When I log out/shutdown/restart and return to Lazarus, the Object Inspector DPI settings are all at 96 (even though they were all at 144 when I shutdown Lazarus). The IDE Icons are all tiny (almost invisible), the source editor windows all had a very small font size, the Form designers were all hosed, and the programs built with Lazarus (after the restart) all appear to be compiled with 96 DPI. I tried rebuilding the IDE, but that had no impact. The DPI remained at 96 as did everything else. Here is the weird part. After restarting, I opened a terminal and entered the command "xdpyinfo | grep dots" to see how it was set. The response was 144x144. Apparently the window manager(s) got the message ;-) even if Lazarus did not. Note that I did NOT enter any other commands except for the xdpyinfo. BUT When I restarted Lazarus the IDE Icons, the Form Designers and the source editor fonts were were correctly sized, and the programs built with Lazarus were correctly sized for 144dpi. I have appropriate xrandr and xdpyinfo commands in .bash_profile and .bash_login (redundancy can't hurt :-D). They don't seem to help. I restarted again, opened a terminal (which showed my debug "echo"s so the two files were executed) and did nothing else. I then CLOSED the terminal and started Lazarus. It came up in 144dpi mode!!!. I can not tell where the interaction between Lazarus and the window managers fails, and I have a work-around (open terminal before starting Lazarus) so the problem is not serious, but it remains an annoyance. = One more minor issue. The Main Menu editor still has issues with the height of fonts in HI-DPI mode, as in: Again this is not serious, just annoying. Thanks, Don Ziesig -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mac Hi-DPI 2
On 03/10/2017 12:54 PM, Ondrej Pokorny via Lazarus wrote: To me it looks like Carbon applications are scaled automatically by the OS. Something similar to what also Windows uses if you switch High-DPI awarness off. That means the regardless of your screen (retina, non-retina) the DPI is always 96. So there shouldn't be any LCL-scaling involved. hm...just tested Qt4 and Qt5 on MacOSX. Qt4 - MacOSX 10.8.6 32 bit (qt4 library uses carbon for it's widgets) Qt5 - MacOSX 10.11 64 bit (qt5 library uses cocoa for it's widgets). When Application.Scaled = False fonts of some controls are resized to smaller fonts (DesignTimePPI on both macs says 72 ) - so my question are here: 1. is 96dpi hardcoded somewhere, so it underscales some fonts in case when dpi is 72 - even with Application.Scaled := False. ? 2. Some forms eg. About lazarus is shown too small, seem that it's scaled to the smaller size because of dpi 72. (ide have application.scaled := True by default), also Find Dialog is reduced but all child controls of FindDialog haven't scaled fonts ,so dialog isn't sized well. Note that both cases were fine before HiDPI changes, also please keep in mind that Lazarus OSX isn't carbon or cocoa only, but qt4 and qt5 too. On linux and windows everything works pretty nice (Application.Scaled := true and Application.Scaled := false) with qt4 and qt5 widgetsets. My app is designed on linux (96 dpi) and then just rebuilded on mac (if that matters), also Mac 10.8.6 is iMac with resolution 1440x900 72dpi, Mac 10.11 have resolution 1920x1200 72dpi (this one is running inside vmware). Any hints ? zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Colorconversion in htmlreport
On 3/11/17, frans via Lazaruswrote: > I want to use the color #D8FFF4. > But the function Color2HTML translate that code to $00D8FFF4# That makes no sense to me. #D8FFF4 looks like HTML color coding, so calling ColorToHTML on that makes no sense (or the name of that makes no sense). Here's a ColorToHtml function from the SynExportHtml unit that works correctly (at least in my limited tests): function ColorToHTML(AColor: TColor): string; var RGBColor: TColorRef; RGBValue: byte; const Digits: array[0..15] of char = '0123456789ABCDEF'; begin Result := ''; case AColor of clRed: Result := 'red'; clGreen: Result := 'green'; clBlue:Result := 'blue'; clPurple: Result := 'purple'; clYellow: Result := 'yellow'; clBlack: Result := 'black'; clWhite: Result := 'white'; clGray:Result := 'gray'; clMaroon: Result := 'maroon'; clFuchsia: Result := 'fuchsia'; clLime:Result := 'lime'; clNavy:Result := 'navy'; clAqua:Result := 'aqua'; clTeal:Result := 'teal'; clSilver: Result := 'silver'; end; if (Result <> '') then Exit; RGBColor := ColorToRGB(AColor); Result := '#00'; {} RGBValue := GetRValue(RGBColor); if RGBValue > 0 then begin Result[2] := Digits[RGBValue shr 4]; Result[3] := Digits[RGBValue and 15]; end; {} RGBValue := GetGValue(RGBColor); if RGBValue > 0 then begin Result[4] := Digits[RGBValue shr 4]; Result[5] := Digits[RGBValue and 15]; end; {} RGBValue := GetBValue(RGBColor); if RGBValue > 0 then begin Result[6] := Digits[RGBValue shr 4]; Result[7] := Digits[RGBValue and 15]; end; end; Note that the represetation of TColor and HTML color (if you both write them out as hex) is not in the same order. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Colorconversion in htmlreport
Hi. I use Lazarus 1.6.2 with FPC 3.0.0 on Windows 10. I use htmlreport to create webpages. My problem is the use of colorcodes. I want to use the color #D8FFF4. But the function Color2HTML translate that code to $00D8FFF4# and that gives a totally different color. I've searched the internet for a converter but found nothing. Therefor I have 2 questions: 1. What does the colorcode $# mean? It's not ?RGB. 2. What code should I use to get the colorresult I want? -- mvg Frans van Leeuwen M 06-51695390 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Projectgroups in Sourceeditor Toolbar
On Sat, 11 Mar 2017 09:20:14 +0100 Andreas Frieß via Lazaruswrote: > Is there an way to bring the menuentries of the projectgroups in the > toolbar of the sourceeditor ? > > If i go into the 'Toolbar Configuration', i didn't find the entries like > 'Open Projectgroup', in the mainmenu it is shown, but not in the editor. > > Lazarus 1.7 rUnversioned directory FPC 3.1.1 i386-win32-win32/win64 > (Lazarus trunk/ FPC trunk) Now you can. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Projectgroups in Sourceeditor Toolbar
Is there an way to bring the menuentries of the projectgroups in the toolbar of the sourceeditor ? If i go into the 'Toolbar Configuration', i didn't find the entries like 'Open Projectgroup', in the mainmenu it is shown, but not in the editor. Lazarus 1.7 rUnversioned directory FPC 3.1.1 i386-win32-win32/win64 (Lazarus trunk/ FPC trunk) Andreas -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus