Beispiel #1
0
        protected void OnPortraitViewSizeChanged(Object sender, EventArgs args)
        {
            View view = (View)sender;

            // view height returned will be for the full size of the grid, not the cell!
            GlobalSingletonHelpers.fixLabelHeight(generalVoting, view.Width, view.Height * (4.0 / 20.0), GlobalStatusSingleton.MIN_FONT_SIZE, 24);
        }
        private void fixFontSizes(object sender, EventArgs args)
        {
            // lightbulbCount not currently drawn.
            //usernameLabel; friendInfo; mostBulbsInOneDay;
            GlobalSingletonHelpers.fixLabelHeight(usernameLabel, Width / 2, usernameLabel.Height);
            GlobalSingletonHelpers.fixLabelHeight(mostBulbsInOneDay, Width / 2, mostBulbsInOneDay.Height);
            GlobalSingletonHelpers.fixLabelHeight(friendInfo, Width / 2, friendInfo.Height);
            double smallestFont = usernameLabel.FontSize;

            if (mostBulbsInOneDay.FontSize < smallestFont)
            {
                smallestFont = mostBulbsInOneDay.FontSize;
            }
            if (friendInfo.FontSize < smallestFont)
            {
                smallestFont = friendInfo.FontSize;
            }
            usernameLabel.FontSize     = smallestFont;
            mostBulbsInOneDay.FontSize = smallestFont;
            friendInfo.FontSize        = smallestFont;
        }