X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fflexui%2Ffui_common.pas;h=38afcbb424d0a7d592f8e6aa963d4d05017e81b0;hb=c7142be1c73501f5ca7fff57c6b1af1891ed83d0;hp=0c809154051de215431d58616bb2a8d4bcf77b1e;hpb=fef632c71084b1574d8d6341f47cb19e04f5ede4;p=d2df-sdl.git diff --git a/src/flexui/fui_common.pas b/src/flexui/fui_common.pas index 0c80915..38afcbb 100644 --- a/src/flexui/fui_common.pas +++ b/src/flexui/fui_common.pas @@ -3,8 +3,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -199,8 +198,11 @@ begin result.a := a; end; -function TGxRGBA.toString (): AnsiString; begin result := formatstrf('rgba(%s,%s,%s,%s)', [r, g, b, a]); end; - +function TGxRGBA.toString (): AnsiString; +begin + if (a = 255) then result := formatstrf('rgb(%s,%s,%s)', [r, g, b]) + else result := formatstrf('rgba(%s,%s,%s,%s)', [r, g, b, a]); +end; // ////////////////////////////////////////////////////////////////////////// //