[mythtv] [PATCH] MythWeb - Wrapping in Command Choices Section
(Default theme)--take 3 ;)
Michael T. Dean
mtdean at thirdcontact.com
Wed May 18 00:48:13 UTC 2005
I realize there was already a patch to fix wrapping in the command
choices area of MythWeb (
http://www.gossamer-threads.com/lists/mythtv/commits/126501#126501 and
http://www.gossamer-threads.com/lists/mythtv/dev/126503#126503 )
followed closely by a fix that removed the non-breaking space character
entities from the patch and instead used CSS's "white-space" property to
prevent wrapping (
http://www.gossamer-threads.com/lists/mythtv/commits/126517#126517 and
http://www.gossamer-threads.com/lists/mythtv/commits/126534#126534 ).
However, I think the original patch was meant to improve the browser's
ability to choose where the break belongs--not to prevent wrapping.
Currently, the command choices are displayed on only one line,
so--depending on the browser size and the user's choice of fonts (i.e.
font-replacement for Arial/Helvetica/sans-serif in fontconfig)--the
command choices section may take up significantly more space than 100%
of the available width. If so, the user has to scroll to the right to
find some of the commands (i.e. Recorded Programs, Backend Status,
Backend Logs on one of my systems with my preferred browser
width/fonts). It also looks rather unsettling since everything else on
the page ends at approximately the same width.
Therefore, the attached patch changes the non-wrapping behavior to
prevent wrapping in the middle of a command (i.e. between "Recorded" and
"Programs" in "Recorded Programs"--basically, it always breaks after a
"|") by enclosing each command in a div of class command_choices. Since
we now have multiple divs using command_choices, I changed
command_choices from an id to a class, as required by the spec.
I considered using floats to allow the wrapped commands to line up under
"Listings" instead of "MythTV:", but decided it would look wrong on very
wide browser windows (i.e. widescreen TFT's at full screen) or with very
small fonts since there would be a lot of whitespace between the
"MythTV:" and the commands. If this behavior is still desired, it would
be possible to accomplish it--even on wide screens--by breaking the
table row that is the command choices section into two table data
elements. If interested, feel free to let me know and I'll put together
another patch.
Thanks,
Mike
-------------- next part --------------
Index: mythweb/themes/Default/style.css
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/themes/Default/style.css,v
retrieving revision 1.25
diff -u -r1.25 style.css
--- mythweb/themes/Default/style.css 22 Apr 2005 01:17:38 -0000 1.25
+++ mythweb/themes/Default/style.css 18 May 2005 00:37:47 -0000
@@ -196,7 +196,8 @@
}
/* the category legend */
-#command_choices {
+.command_choices {
+ display: inline;
white-space: nowrap;
}
#category_legend_popup {
Index: mythweb/themes/Default/theme.php
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/themes/Default/theme.php,v
retrieving revision 1.56
diff -u -r1.56 theme.php
--- mythweb/themes/Default/theme.php 22 Apr 2005 01:17:38 -0000 1.56
+++ mythweb/themes/Default/theme.php 18 May 2005 00:37:47 -0000
@@ -150,24 +150,23 @@
}
function print_menu_content() {
- ?><div id="command_choices">
- <a id="category_legend" onmouseover="popup('category_legend'); return true;">MythTV:</a>
- <a href="program_listing.php"><?php echo t('Listings') ?></a>
- |
- <a href="canned_searches.php"><?php echo t('Searches') ?></a>
- |
- <a href="schedule_manually.php"><?php echo t('Manually Schedule') ?></a>
- |
- <a href="recording_schedules.php"><?php echo t('Recording Schedules') ?></a>
- |
- <a href="scheduled_recordings.php"><?php echo t('Scheduled Recordings') ?></a>
- |
- <a href="recorded_programs.php"><?php echo t('Recorded Programs') ?></a>
- |
- <a href="status.php"><?php echo t('Backend Status') ?></a>
- |
- <a href="log.php"><?php echo ('Backend Logs') ?></a>
- </div><?php
+ ?><div class="command_choices"><a id="category_legend" onmouseover="popup('category_legend'); return true;">MythTV:</a> </div>
+ <div class="command_choices"><a href="program_listing.php"><?php echo t('Listings') ?></a>
+ | </div>
+ <div class="command_choices"><a href="canned_searches.php"><?php echo t('Searches') ?></a>
+ | </div>
+ <div class="command_choices"><a href="schedule_manually.php"><?php echo t('Manually Schedule') ?></a>
+ | </div>
+ <div class="command_choices"><a href="recording_schedules.php"><?php echo t('Recording Schedules') ?></a>
+ | </div>
+ <div class="command_choices"><a href="scheduled_recordings.php"><?php echo t('Scheduled Recordings') ?></a>
+ | </div>
+ <div class="command_choices"><a href="recorded_programs.php"><?php echo t('Recorded Programs') ?></a>
+ | </div>
+ <div class="command_choices"><a href="status.php"><?php echo t('Backend Status') ?></a>
+ | </div>
+ <div class="command_choices"><a href="log.php"><?php echo ('Backend Logs') ?></a></div>
+ <?php
// Create the category legend popup
global $Categories, $Footnotes;
$legend = <<<EOF
More information about the mythtv-dev
mailing list