backgrnd.cxx (28bcfa49) backgrnd.cxx (ca6f8f21)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1222 unchanged lines hidden (view full) ---

1231 // here we have enough space to the left, so layout with fixed column size
1232 // and fixed height, adapt width. Apply the adapted width by moving the left
1233 // edge of the control to the left, keeping the right edge aligned
1234 // with the original position
1235 const Point aCurrentPosContainer(aBorderWin.GetPosPixel());
1236 const Size aCurrentSizeContainer(aBorderWin.GetOutputSizePixel());
1237 const Size aCurrentSizeContent(aBackgroundColorSet.GetOutputSizePixel());
1238 const Size aNewSizeContent(aBackgroundColorSet.layoutToGivenHeight(aCurrentSizeContent.Height() - 4, nColorCount));
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1222 unchanged lines hidden (view full) ---

1231 // here we have enough space to the left, so layout with fixed column size
1232 // and fixed height, adapt width. Apply the adapted width by moving the left
1233 // edge of the control to the left, keeping the right edge aligned
1234 // with the original position
1235 const Point aCurrentPosContainer(aBorderWin.GetPosPixel());
1236 const Size aCurrentSizeContainer(aBorderWin.GetOutputSizePixel());
1237 const Size aCurrentSizeContent(aBackgroundColorSet.GetOutputSizePixel());
1238 const Size aNewSizeContent(aBackgroundColorSet.layoutToGivenHeight(aCurrentSizeContent.Height() - 4, nColorCount));
1239 const Size aNewSizeContainer(aNewSizeContent.Width() + 4, aNewSizeContent.Height() + 4);
1239 static sal_Int32 nAdd = 4;
1240 const Size aNewSizeContainer(aNewSizeContent.Width() + nAdd, aNewSizeContent.Height() + nAdd);
1240 const Point aNewPos((aCurrentPosContainer.X() + aCurrentSizeContainer.Width()) - aNewSizeContainer.Width(), aCurrentPosContainer.Y());
1241
1242 aBorderWin.SetOutputSizePixel(aNewSizeContainer);
1243 aBackgroundColorSet.SetOutputSizePixel(aNewSizeContent);
1241 const Point aNewPos((aCurrentPosContainer.X() + aCurrentSizeContainer.Width()) - aNewSizeContainer.Width(), aCurrentPosContainer.Y());
1242
1243 aBorderWin.SetOutputSizePixel(aNewSizeContainer);
1244 aBackgroundColorSet.SetOutputSizePixel(aNewSizeContent);
1245 aBackgroundColorSet.SetPosSizePixel(Point(nAdd/2, nAdd/2), aNewSizeContent);
1244 aBorderWin.SetPosSizePixel(aNewPos, aNewSizeContainer);
1245}
1246
1247//------------------------------------------------------------------------
1248
1249
1250
1251//------------------------------------------------------------------------

--- 732 unchanged lines hidden ---
1246 aBorderWin.SetPosSizePixel(aNewPos, aNewSizeContainer);
1247}
1248
1249//------------------------------------------------------------------------
1250
1251
1252
1253//------------------------------------------------------------------------

--- 732 unchanged lines hidden ---